开发者

Can you explain chunked encoding?

开发者 https://www.devze.com 2023-01-18 08:59 出处:网络
header(\"Transfer-Encoding: chunked\"); echo\"32 12345678901234567开发者_C百科890123456789012345678901234567890
header("Transfer-Encoding: chunked");
echo"32
12345678901234567开发者_C百科890123456789012345678901234567890
0
"; flush();exit;

When requested with Firefox, 32 and 0 are missing. Why?


The chunked transfer encoding is a sequence of chunks where each chunk consists of at least a size indicator and the chunk data.

In this case 32 and 0 are the size indicators in hexadecimal notation that denote the length of the following chunk data. A chunk size of 0 denotes the end of the chunked data stream.

0

精彩评论

暂无评论...
验证码 换一张
取 消