1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 21:37:35 +00:00

LibWeb: Move Fetch::collect_an_http_quoted_string() into HTTP.{cpp,h}

The Fetch spec is too big to have a generic AbstractOperations.{cpp,h}
file, so let's keep AOs in their section-specific files.
This commit is contained in:
Linus Groh 2022-07-10 19:25:42 +02:00
parent e3798886ed
commit fad69fcacd
6 changed files with 11 additions and 25 deletions

View file

@ -7,7 +7,6 @@
#include <AK/CharacterTypes.h>
#include <AK/GenericLexer.h>
#include <AK/StringBuilder.h>
#include <LibWeb/Fetch/AbstractOperations.h>
#include <LibWeb/Fetch/Infrastructure/HTTP.h>
#include <LibWeb/MimeSniff/MimeType.h>
@ -125,7 +124,7 @@ Optional<MimeType> 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 ';'.