add Content-Length header
This commit is contained in:
parent
e2a7d9f2bf
commit
0f21568c7f
2
main.go
2
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))
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue