nytimes / gziphandler

Go middleware to gzip HTTP responses
https://godoc.org/github.com/NYTimes/gziphandler
Apache License 2.0
868 stars 129 forks source link

Handling HEAD requests #70

Closed jameshartig closed 6 years ago

jameshartig commented 6 years ago

Right now there's not a way to respond to a HEAD request with the correct gzip headers because the headers aren't added until Write and inside the Write a writer is initialized and upon Close the gzip headers are written and you cannot have a body in a HEAD response.