Usage of the content-length header with node-manta client, (any version after 3.x) results into muskie server terminating the HTTP connection with a socket hang up error:
HTTP 47513: SERVER new http connection
HTTP 47513: SERVER socketOnParserExecute NaN
HTTP 47513: parse error
HTTP 47513: server socket close
The reason for this failure is the presence on the same message of both HTTP headers, which is explicitly disallowed by the HTTP 1.1 spec (see https://tools.ietf.org/html/rfc2616#section-4.4).
The fix introduced for MANTA-2937 adds the Transfer-Encoding: chunked header despite or not of Content-Length header being present on MantaClient.chattr options, which results into the aforementioned issue, affecting muskie tests case https://github.com/joyent/manta-muskie/blob/master/test/obj.test.js#L383-L398
Suggested fix is to just append the Transfer-Encoding: chunked header only when Content-Length is not already present
Usage of the
content-length
header with node-manta client, (any version after 3.x) results into muskie server terminating the HTTP connection with asocket hang up error
:The reason for this failure is the presence on the same message of both HTTP headers, which is explicitly disallowed by the HTTP 1.1 spec (see https://tools.ietf.org/html/rfc2616#section-4.4).
The fix introduced for MANTA-2937 adds the
Transfer-Encoding: chunked
header despite or not ofContent-Length
header being present onMantaClient.chattr options
, which results into the aforementioned issue, affecting muskie tests case https://github.com/joyent/manta-muskie/blob/master/test/obj.test.js#L383-L398Suggested fix is to just append the
Transfer-Encoding: chunked
header only whenContent-Length
is not already present