开发者

When requesting a Header file from HTTP , If content-Length is available then no keep-alive shown

开发者 https://www.devze.com 2023-02-14 03:51 出处:网络
When I send a header request to some serversI have two situations , either 1) no content-length response is available which indicated a chunked data, if so then Connection : keep-alive response is av

When I send a header request to some servers I have two situations , either 1) no content-length response is available which indicated a chunked data, if so then Connection : keep-alive response is available 2) Content-Length is available , however Connection: keep-alive is not,

In the second case does that mean the connection is dropped or is it kept alive with default timeout and max con开发者_如何学编程nection settings , thats is why it is not sent.

I really need to make sure the connection is kept alive , for further testing.

I send a Connection : keep-alive every time I make a request ,

Please Help??


For HTTP/1.1 connections, keep-alive is the default. Because of this, the "Connection: keep-alive" header is only useful for HTTP/1.0 connections. So unless the client specifically asks for "Connection: close", the server will (usually) keep the connection open for further requests.

0

精彩评论

暂无评论...
验证码 换一张
取 消