added comment about encoding header

This commit is contained in:
Thomas Hansen 2015-04-26 22:15:43 -06:00
parent 1b17072a89
commit 9d26a9268b

View file

@ -33,7 +33,7 @@ func (g Gzip) ServeHTTP(w http.ResponseWriter, r *http.Request) (int, error) {
return g.Next.ServeHTTP(w, r)
}
r.Header.Del("Accept-Encoding")
r.Header.Del("Accept-Encoding") // Removes header to prevent double encoding by ambitious fastcgi implementations
w.Header().Set("Content-Encoding", "gzip")
gzipWriter := gzip.NewWriter(w)
defer gzipWriter.Close()