diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
commit | 40a355a42d4a9444dc753c04c6608dade2f06a23 (patch) | |
tree | 871fc667d2de662f171103ce5ec067014ef85e61 /netwerk/base/nsURLHelper.h | |
parent | Adding upstream version 124.0.1. (diff) | |
download | firefox-40a355a42d4a9444dc753c04c6608dade2f06a23.tar.xz firefox-40a355a42d4a9444dc753c04c6608dade2f06a23.zip |
Adding upstream version 125.0.1.upstream/125.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'netwerk/base/nsURLHelper.h')
-rw-r--r-- | netwerk/base/nsURLHelper.h | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/netwerk/base/nsURLHelper.h b/netwerk/base/nsURLHelper.h index f5ccc8bac6..36844e6e4b 100644 --- a/netwerk/base/nsURLHelper.h +++ b/netwerk/base/nsURLHelper.h @@ -257,19 +257,20 @@ class URLParams final { * true otherwise */ template <typename ParamHandler> - static bool Parse(const nsACString& aInput, ParamHandler aParamHandler) { + static bool Parse(const nsACString& aInput, bool aShouldDecode, + ParamHandler aParamHandler) { const char* start = aInput.BeginReading(); const char* const end = aInput.EndReading(); while (start != end) { - nsAutoString decodedName; - nsAutoString decodedValue; + nsAutoString name; + nsAutoString value; - if (!ParseNextInternal(start, end, &decodedName, &decodedValue)) { + if (!ParseNextInternal(start, end, aShouldDecode, &name, &value)) { continue; } - if (!aParamHandler(std::move(decodedName), std::move(decodedValue))) { + if (!aParamHandler(std::move(name), std::move(value))) { return false; } } @@ -357,8 +358,8 @@ class URLParams final { static void DecodeString(const nsACString& aInput, nsAString& aOutput); static void ConvertString(const nsACString& aInput, nsAString& aOutput); static bool ParseNextInternal(const char*& aStart, const char* aEnd, - nsAString* aOutDecodedName, - nsAString* aOutDecodedValue); + bool aShouldDecode, nsAString* aOutputName, + nsAString* aOutputValue); struct Param { nsString mKey; |