Skip to content

Commit

Permalink
src: fix query/fragment serialization in URL::SerializeURL
Browse files Browse the repository at this point in the history
These are presumably typos.

PR-URL: #41759
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
  • Loading branch information
addaleax authored and danielleadams committed Apr 24, 2022
1 parent 86b9d3a commit 170a6cb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/node_url.cc
Expand Up @@ -1576,10 +1576,10 @@ std::string URL::SerializeURL(const struct url_data* url,
}
}
if (url->flags & URL_FLAGS_HAS_QUERY) {
output = "?" + url->query;
output += "?" + url->query;
}
if (!exclude && url->flags & URL_FLAGS_HAS_FRAGMENT) {
output = "#" + url->fragment;
output += "#" + url->fragment;
}
return output;
}
Expand Down

0 comments on commit 170a6cb

Please sign in to comment.