From fb1c7b7deacaf9d35cf26c99f46b6354a4420d68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Wed, 24 Aug 2022 21:26:57 +0200 Subject: fix(unstable): finish HTTP response for 205 and 304 responses (#15584) This commit fixes "Deno.serve()" API by making sure that 205 and 304 responses end with "\r\n\r\n". --- cli/tests/unit/flash_test.ts | 1 + cli/tests/unit/spawn_test.ts | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'cli/tests') diff --git a/cli/tests/unit/flash_test.ts b/cli/tests/unit/flash_test.ts index 89e91fd7a..07be6dfcc 100644 --- a/cli/tests/unit/flash_test.ts +++ b/cli/tests/unit/flash_test.ts @@ -1844,6 +1844,7 @@ Deno.test( const msg = decoder.decode(buf.subarray(0, readResult)); assert(msg.startsWith("HTTP/1.1 304 Not Modified")); + assert(msg.endsWith("\r\n\r\n")); conn.close(); diff --git a/cli/tests/unit/spawn_test.ts b/cli/tests/unit/spawn_test.ts index 51664e3d1..df95e333b 100644 --- a/cli/tests/unit/spawn_test.ts +++ b/cli/tests/unit/spawn_test.ts @@ -714,7 +714,12 @@ Deno.test(function spawnSyncStdinPipedFails() { }); Deno.test( - { permissions: { write: true, run: true, read: true } }, + // TODO(bartlomieju): this test became flaky on Windows CI + // raising "PermissionDenied" instead of "NotFound". + { + ignore: Deno.build.os === "windows", + permissions: { write: true, run: true, read: true }, + }, async function spawnChildUnref() { const enc = new TextEncoder(); const cwd = await Deno.makeTempDir({ prefix: "deno_command_test" }); -- cgit v1.2.3