Streaming proxy response has both Content-Length and Transfer-Encoding: chunked headers, which breaks some clients, and is not compliant with RFC.
Steps to reproduce
Make streaming request to proxy with PTU endpoint
Expected behavior
Send response with Transfer-Encoding: chunked without Content-Length
Actual behavior
Response contains both Transfer-Encoding: chunked and Content-Length , causing error in API client:
Error invoking remote method 'send-http-request': Error: Parse Error: Content-Length can't be present with Transfer-Encoding
Justificaiton
Standard requires us to not send Content-Length in case of non-identity Transfer-Encoding, like "chunked", "compress", "deflate", or "gzip":
"Messages MUST NOT include both a Content-Length header field and a non-identity transfer-coding." (RFC 2616, Section 4.4, point 3)
New RFC, Section 3.3.2 is not instructing to ignore this violation, so it would be great to remove the Content-Length, otherwise clients might break.
Streaming proxy response has both
Content-Length
andTransfer-Encoding: chunked
headers, which breaks some clients, and is not compliant with RFC.Steps to reproduce
Expected behavior
Transfer-Encoding: chunked
withoutContent-Length
Actual behavior
Transfer-Encoding: chunked
andContent-Length
, causing error in API client:Justificaiton
Standard requires us to not send Content-Length in case of non-identity Transfer-Encoding, like "chunked", "compress", "deflate", or "gzip":