@marcel91200 / caddy Mirror · read-only / commits / 8c72f343
Fork 0

Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS

Mirrored from https://github.com/Slazee/caddy.git

Synced Nov 13, 15:30 UTC

fileserver: Generate Etag from sidecar file

Don't use the primary/uncompressed file for Etag when serving sidecars. This was just overlooked initially.

Matthew Holt committed Aug 8, 2022 at 12:49 UTC 8c72f343576684f012f97b087a79132583090eff
1 file changed +1
modules/caddyhttp/fileserver/staticfiles.go
+1
@@ -374,6 +374,7 @@ func (fsrv *FileServer) ServeHTTP(w http.ResponseWriter, r *http.Request, next c
374 continue
375 }
376 defer file.Close()
377 + info = compressedInfo
378 w.Header().Set("Content-Encoding", ae)
379 w.Header().Del("Accept-Ranges")
380 w.Header().Add("Vary", "Accept-Encoding")