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

Unset gw once closed #37

Closed jameshartig closed 7 years ago

jameshartig commented 7 years ago

If the handler is already closed, then closing it again causes the gzip writer to be in the pool twice and to be closed in the middle of potentially another write.

jprobinson commented 7 years ago

Thanks for putting this together, @fastest963!

Can you please add a test to replicate the problem?

jameshartig commented 7 years ago

@jprobinson Thanks and added tests!

jprobinson commented 7 years ago

🌠 thanks!