diff --git a/Userland/Libraries/LibWeb/CMakeLists.txt b/Userland/Libraries/LibWeb/CMakeLists.txt index 3e19af5065..ce4fa8a113 100644 --- a/Userland/Libraries/LibWeb/CMakeLists.txt +++ b/Userland/Libraries/LibWeb/CMakeLists.txt @@ -117,7 +117,7 @@ set(SOURCES Dump.cpp Encoding/TextDecoder.cpp Encoding/TextEncoder.cpp - Fetch/AbstractOperations.cpp + Fetch/Infrastructure/HTTP.cpp Fetch/Infrastructure/URL.cpp FontCache.cpp Geometry/DOMRectList.cpp diff --git a/Userland/Libraries/LibWeb/Fetch/AbstractOperations.h b/Userland/Libraries/LibWeb/Fetch/AbstractOperations.h deleted file mode 100644 index 7ab93cd993..0000000000 --- a/Userland/Libraries/LibWeb/Fetch/AbstractOperations.h +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (c) 2022, Luke Wilde - * - * SPDX-License-Identifier: BSD-2-Clause - */ - -#pragma once - -#include - -namespace Web::Fetch { - -enum class HttpQuotedStringExtractValue { - No, - Yes, -}; - -String collect_an_http_quoted_string(GenericLexer& lexer, HttpQuotedStringExtractValue extract_value); - -} diff --git a/Userland/Libraries/LibWeb/Fetch/AbstractOperations.cpp b/Userland/Libraries/LibWeb/Fetch/Infrastructure/HTTP.cpp similarity index 98% rename from Userland/Libraries/LibWeb/Fetch/AbstractOperations.cpp rename to Userland/Libraries/LibWeb/Fetch/Infrastructure/HTTP.cpp index 7a1cdb1b35..253c74a3b9 100644 --- a/Userland/Libraries/LibWeb/Fetch/AbstractOperations.cpp +++ b/Userland/Libraries/LibWeb/Fetch/Infrastructure/HTTP.cpp @@ -7,7 +7,7 @@ #include #include #include -#include +#include namespace Web::Fetch { diff --git a/Userland/Libraries/LibWeb/Fetch/Infrastructure/HTTP.h b/Userland/Libraries/LibWeb/Fetch/Infrastructure/HTTP.h index ffdc2a386c..0d22e2fc87 100644 --- a/Userland/Libraries/LibWeb/Fetch/Infrastructure/HTTP.h +++ b/Userland/Libraries/LibWeb/Fetch/Infrastructure/HTTP.h @@ -1,5 +1,6 @@ /* * Copyright (c) 2022, Linus Groh + * Copyright (c) 2022, Luke Wilde * * SPDX-License-Identifier: BSD-2-Clause */ @@ -19,4 +20,11 @@ inline constexpr StringView HTTP_TAB_OR_SPACE = "\t "sv; // HTTP whitespace is U+000A LF, U+000D CR, or an HTTP tab or space. inline constexpr StringView HTTP_WHITESPACE = "\n\r\t "sv; +enum class HttpQuotedStringExtractValue { + No, + Yes, +}; + +String collect_an_http_quoted_string(GenericLexer& lexer, HttpQuotedStringExtractValue extract_value); + } diff --git a/Userland/Libraries/LibWeb/MimeSniff/MimeType.cpp b/Userland/Libraries/LibWeb/MimeSniff/MimeType.cpp index c07b9b6db2..7d3d7fcf64 100644 --- a/Userland/Libraries/LibWeb/MimeSniff/MimeType.cpp +++ b/Userland/Libraries/LibWeb/MimeSniff/MimeType.cpp @@ -7,7 +7,6 @@ #include #include #include -#include #include #include @@ -125,7 +124,7 @@ Optional MimeType::from_string(StringView string) // 8. If the code point at position within input is U+0022 ("), then: if (lexer.peek() == '"') { // 1. Set parameterValue to the result of collecting an HTTP quoted string from input, given position and the extract-value flag. - parameter_value = collect_an_http_quoted_string(lexer, Fetch::HttpQuotedStringExtractValue::Yes); + parameter_value = Fetch::collect_an_http_quoted_string(lexer, Fetch::HttpQuotedStringExtractValue::Yes); // 2. Collect a sequence of code points that are not U+003B (;) from input, given position. // NOTE: This uses the predicate version as the ignore_until(char) version will also ignore the ';'. diff --git a/Userland/Libraries/LibWeb/XHR/XMLHttpRequest.cpp b/Userland/Libraries/LibWeb/XHR/XMLHttpRequest.cpp index f6139f8f9c..12afd9180f 100644 --- a/Userland/Libraries/LibWeb/XHR/XMLHttpRequest.cpp +++ b/Userland/Libraries/LibWeb/XHR/XMLHttpRequest.cpp @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include