Skip to content

Commit

Permalink
Fix URL parser
Browse files Browse the repository at this point in the history
Fixes #3361.
  • Loading branch information
edolstra committed Feb 18, 2020
1 parent 6529490 commit b5e3c04
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/libstore/fetchers/parse.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ ParsedURL parseURL(const std::string & url)
if (std::regex_match(url, match, uriRegex)) {
auto & base = match[1];
std::string scheme = match[2];
auto authority = match[4].matched
? std::optional<std::string>(match[5]) : std::nullopt;
auto authority = match[3].matched
? std::optional<std::string>(match[3]) : std::nullopt;
std::string path = match[4].matched ? match[4] : match[5];
auto & query = match[6];
auto & fragment = match[7];
Expand Down

0 comments on commit b5e3c04

Please sign in to comment.