From 0552eaf569ef910b0d132b6e60758f17a4519d91 Mon Sep 17 00:00:00 2001 From: Luca Casonato Date: Mon, 19 Apr 2021 01:00:13 +0200 Subject: chore: align `Headers` to spec (#10199) This commit aligns `Headers` to spec. It also removes the now unused 03_dom_iterable.js file. We now pass all relevant `Headers` WPT. We do not implement any sort of header filtering, as we are a server side runtime. This is likely not the most efficient implementation of `Headers` yet. It is however spec compliant. Once all the APIs in the `HTTP` hot loop are correct we can start optimizing them. It is likely that this commit reduces bench throughput temporarily. --- cli/tests/unit/fetch_test.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'cli/tests/unit/fetch_test.ts') diff --git a/cli/tests/unit/fetch_test.ts b/cli/tests/unit/fetch_test.ts index 0fb9da8f4..427ab9b53 100644 --- a/cli/tests/unit/fetch_test.ts +++ b/cli/tests/unit/fetch_test.ts @@ -661,8 +661,8 @@ unitTest( const actual = new TextDecoder().decode(buf.bytes()); const expected = [ "POST /blah HTTP/1.1\r\n", - "hello: World\r\n", "foo: Bar\r\n", + "hello: World\r\n", "accept: */*\r\n", `user-agent: Deno/${Deno.version.deno}\r\n`, "accept-encoding: gzip, br\r\n", @@ -695,9 +695,9 @@ unitTest( const actual = new TextDecoder().decode(buf.bytes()); const expected = [ "POST /blah HTTP/1.1\r\n", - "hello: World\r\n", - "foo: Bar\r\n", "content-type: text/plain;charset=UTF-8\r\n", + "foo: Bar\r\n", + "hello: World\r\n", "accept: */*\r\n", `user-agent: Deno/${Deno.version.deno}\r\n`, "accept-encoding: gzip, br\r\n", @@ -733,8 +733,8 @@ unitTest( const actual = new TextDecoder().decode(buf.bytes()); const expected = [ "POST /blah HTTP/1.1\r\n", - "hello: World\r\n", "foo: Bar\r\n", + "hello: World\r\n", "accept: */*\r\n", `user-agent: Deno/${Deno.version.deno}\r\n`, "accept-encoding: gzip, br\r\n", @@ -1115,8 +1115,8 @@ unitTest( const actual = new TextDecoder().decode(buf.bytes()); const expected = [ "POST /blah HTTP/1.1\r\n", - "hello: World\r\n", "foo: Bar\r\n", + "hello: World\r\n", "accept: */*\r\n", `user-agent: Deno/${Deno.version.deno}\r\n`, "accept-encoding: gzip, br\r\n", -- cgit v1.2.3