简体   繁体   中英

HTTP Content-Length and Content-Encoding

由于Content-Encoding: gzip ,HTTP响应标头Content-Length与解码主体之前或之后Content-Length有关?

It is raw length of whatever is in the HTTP body. This allows the HTTP client to detect the end of the transmission in cases of persistent connection. Thus, if the body is 10000 bytes pre-compression but 5000 bytes compressed, length is 5000; counting from the end of the header, 5001th byte received will be part of a new HTTP transmission.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM