add Content-Length header

This commit is contained in:
lemmi 2020-01-23 07:00:54 +01:00
parent e2a7d9f2bf
commit 0f21568c7f
1 changed files with 2 additions and 0 deletions

View File

@ -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))
}
}