• BigMikes's avatar
    net/http: in Transport, don't error on non-chunked response with Trailer header · 7b0fa529
    BigMikes authored
    There are cases where HTTP message specifies the Trailer header
    but not the Transfer-Encoding = chunked. The existing
    implementation would return an error in those cases, without
    returning also the message itself.
    Instead, it would be preferable to let the library user decide when
    the message is valid or not.
    This change makes the fixTrailer() function not to return an error
    and to keep the Trailer value in the Response.Header map but not
    populate Response.Trailer.
    
    Fixes #27197
    
    Change-Id: Ic1e96791fde97f31dc5ecb8de05c8e4f49465c2c
    Reviewed-on: https://go-review.googlesource.com/c/145398
    Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
    7b0fa529
Name
Last commit
Last update
.github Loading commit data...
api Loading commit data...
doc Loading commit data...
lib/time Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING.md Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README.md Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...