From 0f21568c7f6b17c3b8f92916519812a13ae484bf Mon Sep 17 00:00:00 2001 From: lemmi Date: Thu, 23 Jan 2020 07:00:54 +0100 Subject: [PATCH] add Content-Length header --- main.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/main.go b/main.go index 371ea4b..67ccc26 100644 --- a/main.go +++ b/main.go @@ -11,6 +11,7 @@ import ( "net/http" "os" "sort" + "strconv" "strings" "sync" "time" @@ -368,6 +369,7 @@ func cachedRender(rs *routeStats) http.HandlerFunc { w.Header().Add("Content-Encoding", "gzip") } + w.Header().Set("Content-Length", strconv.FormatInt(int64(len(c)), 10)) http.ServeContent(w, r, "/", timestamp, bytes.NewReader(c)) } }