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

Miscellaneous fixes from negroni-gzip #13

Closed xzyfer closed 8 years ago

xzyfer commented 8 years ago

This is a set of fixes largely copied from https://github.com/phyber/negroni-gzip

Most importantly it fixes #12 which is somewhat critical.

xzyfer commented 8 years ago

Unfortunately there are more fundamental issues that prevent fixing #12.

adammck commented 8 years ago

Can you elaborate on those fundamental issues? The Content-Length header problem, at least, appears to be solvable.

xzyfer commented 8 years ago

I'm out at the moment. The problem is that when you're reverse proxying deleting headers is somewhat more involved. You need to intercept the write and modify the headers before writing the body.

I have a more involved WIP PR. The linked issue demonstrates the issue.