net/http: Server removes all explicitly set Transfer-Encoding
headers
#16063
Labels
Milestone
Transfer-Encoding
headers
#16063
The net/http server removes all explicitly set
Transfer-Encoding
headers (when operating in HTTP/1.1 mode).This bug was introduced by the fix of #15960 (f9b4556), sorry for any ambiguous wording on my end.
Example:
For clients accepting a
gzip
transfer-coding, net/http removes the explicitly setgzip
from theTransfer-Encoding
header and only sendschunked
.To fix both issues there must be a check for the header field's value (
== "chunked"
).E.g. (the line introduced by #15960 also has to be removed):
To reiterate:
chunked
should not result in a duplicateTransfer-Encoding: chunked
headerchunked
must be applied also, but the explicitly set transfer-encoding should be kept in the headerDetails can be found in RFC 2616 Section 3.6.
The text was updated successfully, but these errors were encountered: