Closed jabley closed 9 years ago
Seems to be a resource leak somewhere. Seeing
Error: Max concurrent streams limit exceeded.
and not sure if this is due to my change.
Resource leak isn't due to this change. It's an existing thing that I'll open a separate issue for.
I'm not too keen to add transparent decompression, since "net/http" doesn't (see "net/http.Transport.DisableCompression"'s documentation) and the client may wish to store the compressed version directly, without having to recompress after transparent decompression.
What about a different patch?
In this instance, responses were compressed even though the client didn't ask for compressed responses. It feels like a client shouldn't have to decompress that response.
Ah, fair point, I'll get to work
Tweaked patch that checks the request to see if the Accept-Encoding
header was set.
Sorry, didn't see you'd also done roughly the same thing. Thanks a lot for your help; much appreciated =)
np, thanks for fixing it.
From the spec – http://www.chromium.org/spdy/spdy-protocol/spdy-protocol-draft3-1
“User-agents MUST support gzip compression. Regardless of the Accept-Encoding sent by the user-agent, the server may always send content encoded with gzip or deflate encoding.”
This change adds transparent decompression of gripped content.
I found this when I modified client code to use SPDY to talk to an origin server. The origin is using nginx. I was getting errors when trying to unmarshall JSON:
Enabling debug logging, I saw the request:
and a response:
This shows that the response is coming back compressed, even though the client didn’t ask for that.