Skip to content

Commit

Permalink
middleware: fix set Vary header (#640)
Browse files Browse the repository at this point in the history
  • Loading branch information
mytheta committed Jan 3, 2022
1 parent 55dd7fc commit b750c80
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion middleware/compress.go
Expand Up @@ -318,7 +318,7 @@ func (cw *compressResponseWriter) WriteHeader(code int) {
if cw.encoding != "" {
cw.compressable = true
cw.Header().Set("Content-Encoding", cw.encoding)
cw.Header().Set("Vary", "Accept-Encoding")
cw.Header().Add("Vary", "Accept-Encoding")

// The content-length after compression is unknown
cw.Header().Del("Content-Length")
Expand Down

0 comments on commit b750c80

Please sign in to comment.