如果数据作为分块发送(Transfer-Encoding: chunked),则必须省略Content-Length头,as per RFC 2616:
[snip]
If a Transfer-Encoding header field (section 14.41) is present and
has any value other than "identity", then the transfer-length is
defined by use of the "chunked" transfer-coding (section 3.6),
unless the message is terminated by closing the connection.
If a Content-Length header field (section 14.13) is present, its
decimal value in OCTETs represents both the entity-length and the
transfer-length. The Content-Length header field MUST NOT be sent
if these two lengths are different (i.e., if a Transfer-Encoding
header field is present). If a message is received with both a
Transfer-Encoding header field and a Content-Length header field,
the latter MUST be ignored.
如果数据作为分块发送(
Transfer-Encoding: chunked
),则必须省略Content-Length
头,as per RFC 2616:相关问题 更多 >
编程相关推荐