HTTP-POST方法使用问题

[复制链接]
 楼主| jolee 发表于 2013-7-26 15:30 | 显示全部楼层 |阅读模式
POS, ST, TI, IO, TE
请教HTTP-POST方法使用时,当要上传内容长度Content-Length超过IP包长度限制如10000,一般是如何处理的?
{
  "POST /ems/php/emud.php HTTP/1.0\r\n"
  "Host: 192.168.52.69\r\n"
  "Connection: close\r\n"
  "Content-Type: application/x-www-form-urlencoded\r\n"
  "Content-Length: 10000\r\n"
  "\r\n"
  "information=xxxxxxxxxxxxxxxxx"
};

可以把要发送的内容拆分成:头字符串/数据内容/数据内容/数据内容... 再多次调用send()发送出去,发送完所有数据再close(),这样可行吗?发送头字符串时,Connection: 是否要定义为Keep-Alive?

感谢!
您需要登录后才可以回帖 登录 | 注册

本版积分规则

5

主题

11

帖子

0

粉丝
快速回复 返回顶部 返回列表