From f42f0cceaaadcf84698c1f51ceb28b5e4b0d37b1 Mon Sep 17 00:00:00 2001 From: Linus Groh Date: Tue, 12 Jul 2022 22:58:46 +0100 Subject: [PATCH] LibWeb: Make Fetch::collect_an_http_quoted_string()'s 2nd param optional --- Userland/Libraries/LibWeb/Fetch/Infrastructure/HTTP.h | 2 +- Userland/Libraries/LibWeb/XHR/XMLHttpRequest.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Userland/Libraries/LibWeb/Fetch/Infrastructure/HTTP.h b/Userland/Libraries/LibWeb/Fetch/Infrastructure/HTTP.h index 0d22e2fc87..3ccec4d61e 100644 --- a/Userland/Libraries/LibWeb/Fetch/Infrastructure/HTTP.h +++ b/Userland/Libraries/LibWeb/Fetch/Infrastructure/HTTP.h @@ -25,6 +25,6 @@ enum class HttpQuotedStringExtractValue { Yes, }; -String collect_an_http_quoted_string(GenericLexer& lexer, HttpQuotedStringExtractValue extract_value); +String collect_an_http_quoted_string(GenericLexer& lexer, HttpQuotedStringExtractValue extract_value = HttpQuotedStringExtractValue::No); } diff --git a/Userland/Libraries/LibWeb/XHR/XMLHttpRequest.cpp b/Userland/Libraries/LibWeb/XHR/XMLHttpRequest.cpp index 12afd9180f..7eca4a9467 100644 --- a/Userland/Libraries/LibWeb/XHR/XMLHttpRequest.cpp +++ b/Userland/Libraries/LibWeb/XHR/XMLHttpRequest.cpp @@ -279,7 +279,7 @@ Optional> XMLHttpRequest::get_decode_and_split(String const& head // 1. If the code point at position within input is U+0022 ("), then: if (lexer.peek() == '"') { // 1. Append the result of collecting an HTTP quoted string from input, given position, to value. - auto quoted_value_part = Fetch::collect_an_http_quoted_string(lexer, Fetch::HttpQuotedStringExtractValue::No); + auto quoted_value_part = Fetch::collect_an_http_quoted_string(lexer); value.append(quoted_value_part); // 2. If position is not past the end of input, then continue.