From 554cd2c27b8ef0d769b890d47f310bb115ea4a16 Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Sat, 29 Jan 2022 22:14:02 +0100 Subject: [PATCH] src: fix query/fragment serialization in URL::SerializeURL MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit These are presumably typos. PR-URL: https://github.com/nodejs/node/pull/41759 Reviewed-By: Benjamin Gruenbaum Reviewed-By: Tiancheng "Timothy" Gu Reviewed-By: Darshan Sen Reviewed-By: James M Snell Reviewed-By: Tobias Nießen Reviewed-By: Daijiro Wachi --- src/node_url.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/node_url.cc b/src/node_url.cc index 49f93f5fa20cd9..056c6c466ba0ad 100644 --- a/src/node_url.cc +++ b/src/node_url.cc @@ -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; }