【问题标题】:Using apache httpcomponent 4.0.x, how to send a http request without the header "Connection: Keep-Alive" from a client prgram?使用 apache httpcomponent 4.0.x,如何从客户端 prgram 发送没有标头“Connection: Keep-Alive”的 http 请求?
【发布时间】:2011-05-30 06:06:29
【问题描述】:

我正在使用 apache httpcomponent 4.0.x。

如何从客户端 prgram 发送没有标头“Connection: Keep-Alive”的 http 请求?

出于某种原因,无论 http 版本设置为什么,Connection 标头始终设置为 keep-alive。版本 http 1.0。或 1.1 没有任何区别。

【问题讨论】:

    标签: apache http http-headers keep-alive


    【解决方案1】:

    如果您将版本设置为 1.0 并且它仍然添加“连接:保持活动”,您应该在项目的 bug tracker 将其报告为错误。 HTTP 1.0 不支持持久连接,因此不应添加标头。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-05-30
      • 2013-07-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-06-09
      • 1970-01-01
      • 2016-04-03
      相关资源
      最近更新 更多