2 project dream Project_Dream 于 2014.06.29 04:15 提问

Linux c socket发送http请求得到了响应报文,但是有问题啊

我发送的是:

GET /  HTTP/1.1\r\n
Host:www.baidu.com\r\n

但是得到的是下面的内容:
HTTP/1.1 200 OK
Date: Sat, 28 Jun 2014 20:13:27 GMT
Content-Type: text/html; charset=utf-8
Transfer-Encoding: chunked
Connection: Keep-Alive
Vary: Accept-Encoding
Set-Cookie: BAIDUID=422D83CD9CAF840D5FF1B023C4C384C5:FG=1; expires=Thu, 31-Dec-37 23:55:55 GMT; max-age=2147483647; path=/; domain=.baidu.com
Set-Cookie: BDSVRTM=0; path=/
Set-Cookie: H_PS_PSSID=6994_7410_1462_5225_6995_7344_6506_7232_6018_7203_6699_7133_7387_6983; path=/; domain=.baidu.com
P3P: CP=" OTI DSP COR IVA OUR IND COM "
Cache-Control: private
Cxy_all: baidu+46c3cc6ffd3906e6a5e8cad31c2a632f
Expires: Sat, 28 Jun 2014 20:13:02 GMT
X-Powered-By: HPHP
Server: BWS/1.1
BDPAGETYPE: 1
BDQID: 0x9d742e82002a6bba
BDUSERID: 0
为什么没有html的内容啊,只有偶尔的才会有。

Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!