Skip to content

Commit b59f7db

Browse files
add content-length header
1 parent 56f1f2b commit b59f7db

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

pmtiles/server.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -526,6 +526,8 @@ func (server *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) int {
526526
w.Header().Set(k, v)
527527
}
528528
if statusCode == 200 {
529+
w.Header().Set("Content-Length", strconv.Itoa(len(body)))
530+
529531
lrw := &loggingResponseWriter{w, 200}
530532
// handle if-match, if-none-match request headers based on response etag
531533
http.ServeContent(

0 commit comments

Comments
 (0)