diff options
| author | Brad Fitzpatrick <bradfitz@golang.org> | 2016-04-16 09:35:32 -0700 |
|---|---|---|
| committer | Brad Fitzpatrick <bradfitz@golang.org> | 2016-05-01 06:29:57 +0000 |
| commit | ca8b6270724026fb7697e9f9510d1e6865ed7045 (patch) | |
| tree | 49bb0ba6d9c5043829d576af5efeef772bd168ca /src/androidtest.bash | |
| parent | a9cf0b1e1e2a66db547fcabb7188465e4ac54700 (diff) | |
| download | go-ca8b6270724026fb7697e9f9510d1e6865ed7045.tar.xz | |
net/http: add Response.Uncompressed bool
The Transport's automatic gzip uncompression lost information in the
process (the compressed Content-Length, if known). Normally that's
okay, but it's not okay for reverse proxies which have to be able to
generate a valid HTTP response from the Transport's provided
*Response.
Reverse proxies should normally be disabling compression anyway and
just piping the compressed pipes though and not wasting CPU cycles
decompressing them. So also document that on the new Uncompressed
field.
Then, using the new field, fix Response.Write to not inject a bogus
"Connection: close" header when it doesn't see a transfer encoding or
content-length.
Updates #15366 (the http2 side remains, once this is submitted)
Change-Id: I476f40aa14cfa7aa7b3bf99021bebba4639f9640
Reviewed-on: https://go-review.googlesource.com/22671
Reviewed-by: Andrew Gerrand <adg@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/androidtest.bash')
0 files changed, 0 insertions, 0 deletions
