首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 软件管理 > 软件开发 >

怎的接收http响应(http response)

2013-09-27 
怎样接收http响应(http response)http到response中有一个头叫做Content-Length,代表body有多少字节。但是如

怎样接收http响应(http response)

http到response中有一个头叫做Content-Length,代表body有多少字节。

但是如果response中没有这个头,一般就是所谓的chunked接收了,这时候会有另外一个头

Transfer-Encoding: chunked

代表字节数在body中,如:

a1

<html>

...

</html>

0

其中a1是16进制数字,也就是说有161个字节需要传输,最后的0代表这次应答完毕。

原文:http://blog.csdn.net/hongchangfirst/article/details/8705053

作者:hongchangfirst

hongchangfirst的主页:http://blog.csdn.net/hongchangfirst



热点排行