From 13db64fbc6a8da68e5f6c1da59e058a1a3146054 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Fri, 3 Apr 2020 12:11:52 -0400 Subject: Remove /std/media_types (#4594) --- std/http/file_server_test.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'std/http/file_server_test.ts') diff --git a/std/http/file_server_test.ts b/std/http/file_server_test.ts index 3cb59e67f..404d133ae 100644 --- a/std/http/file_server_test.ts +++ b/std/http/file_server_test.ts @@ -39,8 +39,7 @@ test("file_server serveFile", async (): Promise => { const res = await fetch("http://localhost:4500/README.md"); assert(res.headers.has("access-control-allow-origin")); assert(res.headers.has("access-control-allow-headers")); - assert(res.headers.has("content-type")); - assert(res.headers.get("content-type")!.includes("charset=utf-8")); + assertEquals(res.headers.get("content-type"), "text/markdown"); const downloadedFile = await res.text(); const localFile = new TextDecoder().decode( await Deno.readFile("README.md") @@ -148,6 +147,6 @@ test("contentType", async () => { const request = new ServerRequest(); const response = await serveFile(request, "http/testdata/hello.html"); const contentType = response.headers!.get("content-type"); - assertEquals(contentType, "text/html; charset=utf-8"); + assertEquals(contentType, "text/html"); (response.body as Deno.File).close(); }); -- cgit v1.2.3