It fixes the test TestChunkedResponseConversion of fwd.go.
The assertion to check the Content-Length header has been removed because it's not present in response with go1.16.
By enforcing flushes in net/http/httputil/reverseproxy.go when proxying streamed responses with unknown body lengths, in go1.16, the call of flush() method of the net/http/server.go#chunkWriter happens before any call of its Write() method, which leads eventually to the removal of the Content-Length header.
Messages MUST NOT include both a Content-Length header field and a non-identity transfer-coding. If the message does include a non-identity transfer-coding, the Content-Length MUST be ignored.
The test is now ensuring that Content-Length header is not present in the response only for go1.16+.
This PR bumps to go1.16.
It fixes the test
TestChunkedResponseConversion
offwd.go
.The assertion to check the Content-Length header has been removed because it's not present in response with go1.16. By enforcing flushes in net/http/httputil/reverseproxy.go when proxying streamed responses with unknown body lengths, in go1.16, the call of flush() method of the net/http/server.go#chunkWriter happens before any call of its Write() method, which leads eventually to the removal of the Content-Length header.
Also as per RFC2616 (https://tools.ietf.org/html/rfc2616#section-4.4):
The test is now ensuring that
Content-Length
header is not present in the response only for go1.16+.