您能解释分块编码吗? [英] Can you explain chunked encoding?
本文介绍了您能解释分块编码吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
header("Transfer-Encoding: chunked");
echo"32
12345678901234567890123456789012345678901234567890
0
"; flush();exit;
当Firefox请求时,缺少 32
和 0
.为什么?
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.
在这种情况下, 32
和 0
是十六进制表示的大小指示符,表示后续块数据的长度.块大小为0表示分块数据流的末尾.
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.
这篇关于您能解释分块编码吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文