From e57f0749e7129d0ee57f5b56dfed217ba0a52b94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=A8=E6=9D=89?= Date: Fri, 1 May 2020 22:35:18 +0800 Subject: fix(std/http): avoid directly modifying the headers object (#5024) --- std/http/file_server.ts | 2 -- 1 file changed, 2 deletions(-) (limited to 'std/http/file_server.ts') diff --git a/std/http/file_server.ts b/std/http/file_server.ts index d847642d9..cc92e0d47 100755 --- a/std/http/file_server.ts +++ b/std/http/file_server.ts @@ -11,7 +11,6 @@ import { posix, extname } from "../path/mod.ts"; import { listenAndServe, ServerRequest, Response } from "./server.ts"; import { parse } from "../flags/mod.ts"; import { assert } from "../testing/asserts.ts"; -import { setContentLength } from "./io.ts"; interface EntryInfo { mode: string; @@ -173,7 +172,6 @@ async function serveDir( body: page, headers, }; - setContentLength(res); return res; } -- cgit v1.2.3