summaryrefslogtreecommitdiff
path: root/src/pkg/http/fs.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/http/fs.go')
-rw-r--r--src/pkg/http/fs.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/pkg/http/fs.go b/src/pkg/http/fs.go
index 17d5297b8..28a0c51ef 100644
--- a/src/pkg/http/fs.go
+++ b/src/pkg/http/fs.go
@@ -175,7 +175,9 @@ func serveFile(w ResponseWriter, r *Request, name string, redirect bool) {
}
w.Header().Set("Accept-Ranges", "bytes")
- w.Header().Set("Content-Length", strconv.Itoa64(size))
+ if w.Header().Get("Content-Encoding") == "" {
+ w.Header().Set("Content-Length", strconv.Itoa64(size))
+ }
w.WriteHeader(code)