From 16136f0bddb35af7148e78dbf8f1de97a1575e53 Mon Sep 17 00:00:00 2001 From: Linus Groh Date: Wed, 26 Oct 2022 10:26:12 +0100 Subject: [PATCH] LibWeb: Fix incorrect peek offset in HeaderList::get_decode_and_split() We want to look at the current character, not the next one. --- Userland/Libraries/LibWeb/Fetch/Infrastructure/HTTP/Headers.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Libraries/LibWeb/Fetch/Infrastructure/HTTP/Headers.cpp b/Userland/Libraries/LibWeb/Fetch/Infrastructure/HTTP/Headers.cpp index 1888476bfd..0147f03883 100644 --- a/Userland/Libraries/LibWeb/Fetch/Infrastructure/HTTP/Headers.cpp +++ b/Userland/Libraries/LibWeb/Fetch/Infrastructure/HTTP/Headers.cpp @@ -121,7 +121,7 @@ ErrorOr>> HeaderList::get_decode_and_split(ReadonlyBytes // 2. Otherwise: else { // 1. Assert: the code point at position within input is U+002C (,). - VERIFY(lexer.peek(1) == ','); + VERIFY(lexer.peek() == ','); // 2. Advance position by 1. lexer.ignore(1);