打印

HTTP-POST方法使用问题

[复制链接]
1333|0
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
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

粉丝