瀏覽代碼

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
Linus Groh 3 年之前
父節點
當前提交
69d324d46a
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      Userland/Libraries/LibWeb/Fetch/Headers.cpp

+ 1 - 1
Userland/Libraries/LibWeb/Fetch/Headers.cpp

@@ -273,7 +273,7 @@ DOM::ExceptionOr<void> Headers::fill(HeadersInit const& object)
                 // 2. Append (header’s first item, header’s 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)));
             }