本帖最后由 lovewangya 于 2010-07-10 11:06:50 编辑

解决方案 »

  1.   

    RFC2616 7.2.2说:
    The entity-length of a message is the length of the message-body before any 
    transfer-codings have been applied.
    检测Server返回的内容的长度,看第4.4节.69da是长度
      

  2.   

    当server和client使用keep-alive技术时,server返回数据后不会立即断开连接,
    这个时候,client就必须知道server到底返回了多少字节,如果不够,还要继续等,
    如果回复的头中包含了Content-Length字段,可以根据这个获得长度,
    如果没有包含这个字段,可以在传输实际的数据前,传送一个数,表示数据长度。
      

  3.   

    上次遇到过,指定useragent即可。
      

  4.   

    http://hi.baidu.com/singlestudio/blog/item/86d7881f15865001304e15a6.html
    上次的总结:)
      

  5.   

    Transfer-Encoding: chunked
    对于这种传输方式,处理时要非常小心,要不断读取数据,直到返回一个长度为0的chunk为止。因为这种传输方式,数据不是一次性传输过来的,服务器可以把数据分成几个部分,边生产边传输。
      

  6.   

    按照您的说法做了,依然存在。why?
      

  7.   


    这个没用,以何种方式传输,服务器说了算,
    以下是firefox打开http://www.123cha.com/返回的http头
    (Status-Line) HTTP/1.1 200 OKServer 123cha.comDate Sat, 10 Jul 2010 09:50:16 GMTContent-Type text/html; charset=UTF-8Transfer-Encoding chunkedConnection keep-aliveKeep-Alive timeout=5Vary Accept-EncodingX-Powered-By PHP/5.3.1Content-Encoding gzip
      

  8.   

    就是用fsocket用get方法获取这个地址http://www.123cha.com/的时候会多出来一行,如下:
    HTTP/1.1 200 OK
    Server: 123cha.com
    Date: Sat, 10 Jul 2010 03:04:41 GMT
    Content-Type: text/html; charset=UTF-8
    Transfer-Encoding: chunked
    Connection: close
    Vary: Accept-Encoding
    X-Powered-By: PHP/5.3.1
     
    69da
    <html>
    <head><title>