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: nodejs#41759
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Tiancheng "Timothy" Gu <[email protected]>
Reviewed-By: Darshan Sen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Daijiro Wachi <[email protected]>
  • Loading branch information
addaleax authored and danielleadams committed Apr 21, 2022
1 parent 5abf380 commit eb4c816
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/node_url.cc
Original file line number Diff line number Diff line change
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 eb4c816

Please sign in to comment.