Content_length那个值是报文正文的长度。
不包括报文的信息头等等,你用这个长度肯定回溢出的。因为报文是长度比Content_length大

解决方案 »

  1.   

    以下面为例:  POST /expert/replynews.asp HTTP/1.1\r\n
      Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*\r\n
      Referer: http://www.csdn.net/expert/Topic/119/119692.shtm\r\n
      Accept-Language: zh-cn\r\n
      Content-Type: application/x-www-form-urlencoded\r\n
      Accept-Encoding: gzip, deflate\r\n
      User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows 98)\r\n
      Host: www.csdn.net\r\n
      Content-Length: 48\r\n
      Connection: Keep-Alive\r\n
      Cookie: ASPSESSIONIDGGQQQMFG=EOALPHNBKCJAJHEINGPJLIPF; room=1;    userid=76417\r\n\r\n
      id=119692&Content=22&B1=%A1%A1%BB%D8%B8%B4%A1%A1\r\n其中Content-Length是 48这个48是id=119692&Content=22&B1=%A1%A1%BB%D8%B8%B4%A1%A1的长度.