http - Is Content-Length or Transfer-Encoding is mandatory in a response when it has body -
if response has body / can have body (i.e status code not 204 or 304), should have either content-length or transfer-encoding in response header. in spec not clear.
in scenario have body without content-length or transfer encoding header, curl keep on waiting no chunk, no close, no size. assume close signal end
while other clients (like postman) getting content without hanging.
transfer-encoding http/1.1 addition. so, version of protocol seems relevant here.
it states content-length
:
it should sent whenever message's length can determined prior being transferred, unless prohibited rules in section 4.4.
this indicates not required sent.
with transfer-encoding
standard states:
the transfer-encoding general-header field indicates (if any) type of transformation has been applied message body in order safely transfer between sender , recipient.
this allows leaving out header field if no transfer encoding being applied.
from follows: both headers may validly missing response.
in case curl
telling does: waiting remote side close connection knowing data has been received.
you should provide curl flags , relevant communications -v
allow more insight in why other tools seem better idea on why there no more data before eof has been encountered.
Comments
Post a Comment