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

[WIP] Write the response code before it gets assumed as '200 OK' #52

Closed kevinjqiu closed 7 years ago

kevinjqiu commented 7 years ago

I believe this is what's causing https://github.com/containous/traefik/issues/1937

When the response code isn't written back, subsequent calls through the ReponseWriter.Write will make Go assume the response code is 200 OK.

This is evidenced by the warning message in the logs:

2017/08/11 14:31:11 server.go:2753: http: multiple response.WriteHeader calls
kevinjqiu commented 7 years ago

Never mind. Traefik needs to be updated to the latest gziphanlder code. Closing.