summaryrefslogtreecommitdiff
path: root/std/http/file_server.ts
diff options
context:
space:
mode:
author木杉 <zhmushan@qq.com>2020-05-01 22:35:18 +0800
committerGitHub <noreply@github.com>2020-05-01 10:35:18 -0400
commite57f0749e7129d0ee57f5b56dfed217ba0a52b94 (patch)
treef4d802219c9e43266f7df75f9c51e5f5c483bbf8 /std/http/file_server.ts
parentbe65f6692f0f81dc88c77ba4cf22cdda40760317 (diff)
fix(std/http): avoid directly modifying the headers object (#5024)
Diffstat (limited to 'std/http/file_server.ts')
-rwxr-xr-xstd/http/file_server.ts2
1 files changed, 0 insertions, 2 deletions
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;
}