【问题标题】:How to create a http client with tcp keep-alive using the method POST?如何使用 POST 方法创建具有 tcp keep-alive 的 http 客户端?
【发布时间】:2016-03-22 17:00:32
【问题描述】:

我需要用 tcp keep-alive 创建一个 http 客户端。

我已经用get方法成功创建了它,但是我希望第一个数据包使用带有注册信息的Post方法。

当我在 http 标头中将 GET 替换为 POST 时,服务器很快就会发送 fin/ack。

帖子标题有什么问题?

The wireshark pic with the post header

The wireshark pic with the post header 2

【问题讨论】:

    标签: http post keep-alive


    【解决方案1】:

    好吧,我在帖子标题中丢失了 Content-Length。

    当我添加 Content-Length 时,服务器不发送 fin/ack。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-01-19
      • 2013-09-24
      • 1970-01-01
      • 2010-09-29
      • 2016-09-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多