LibWeb: Fix accidental (name, name) header in Headers::fill()

This makes two more WPT tests pass here:
http://wpt.live/fetch/api/headers/headers-basic.any.html
This commit is contained in:
Linus Groh 2022-07-20 17:40:05 +01:00
commit 69d324d46a
Notes: sideshowbarker 2024-07-17 08:45:22 +09:00

View file

@ -273,7 +273,7 @@ DOM::ExceptionOr<void> Headers::fill(HeadersInit const& object)
// 2. Append (headers first item, headers second item) to headers.
auto header = Fetch::Infrastructure::Header {
.name = TRY_OR_RETURN_OOM(ByteBuffer::copy(entry[0].bytes())),
.value = TRY_OR_RETURN_OOM(ByteBuffer::copy(entry[0].bytes())),
.value = TRY_OR_RETURN_OOM(ByteBuffer::copy(entry[1].bytes())),
};
TRY(append(move(header)));
}