Transfer-Encoding is a HTTP/1.1 addition. So, that version of the protocol seems relevant here.
It states about Content-Length
:
it SHOULD be sent whenever the message's length can be determined prior to being transferred, unless this is prohibited by the rules in section 4.4.
This clearly indicates that it is not required to be sent.
With Transfer-Encoding
the standard states:
The Transfer-Encoding general-header field indicates what (if any) type of transformation has been applied to the message body in order to safely transfer it between the sender and the recipient.
This allows for leaving out the header field if no transfer encoding is being applied.
From this follows: both headers may validly be missing from a response.
In your case curl
is telling what it does: It is waiting for the remote side to close the connection for knowing the data has been fully received.
You should provide your curl flags and the relevant communications from -v
to allow more insight in why other tools seem to get a better idea on why there is no more data before EOF has been encountered.