W3C home > Mailing lists > Public > ietf-http-wg@w3.org > January to March 2012

Re: HTTP/1.0 request - should the server close the connection after response?

From: Ben Niven-Jenkins <ben@niven-jenkins.co.uk>
Date: Thu, 23 Feb 2012 18:27:42 +0000
Cc: Alvaro Lopez Ortega <alvaro@alobbs.com>, Willy Tarreau <w@1wt.eu>, HTTP Working Group <ietf-http-wg@w3.org>
Message-Id: <C3101C13-AE59-48D9-A18B-B2FC3D83E39E@niven-jenkins.co.uk>
To: Zhong Yu <zhong.j.yu@gmail.com>

On 23 Feb 2012, at 18:19, Zhong Yu wrote:

> Thank you both. So, "Connection:keep-alive" in 1.0 is very dependable
> in practice, server should keep the connection alive.
> If that's the case, shouldn't we remove the alarming languages in
> [part 1, A.1.2.]? They might be legitimate concerns in 1999, but no
> longer relevant today.
>   However, some experimental implementations of HTTP/1.0
>   persistent connections are faulty; for example, if a HTTP/1.0 proxy
>   server doesn't understand Connection, it will erroneously forward
>   that header to the next inbound server, which would result in a hung
>   connection.
>   ...
>   Clients are also encouraged to consider the use of Connection: keep-
>   alive in requests carefully; while they can enable persistent
>   connections with HTTP/1.0 servers, clients using them need will need
>   to monitor the connection for "hung" requests (which indicate that
>   the client ought stop sending the header), and this mechanism ought
>   not be used by clients at all when a proxy is being used.

Aren't these two different things that you're confusing?

Your original question was about how a HTTP/1.1 server should handle the presence of "Connection:" in a HTTP/1.0 request.

The text above is warning HTTP/1.0 clients that HTTP/1.0 proxies may not handle the presence of "Connection:" properly.


> On Thu, Feb 23, 2012 at 11:56 AM, Alvaro Lopez Ortega <alvaro@alobbs.com> wrote:
>> On 02/23/2012 05:56 PM, Willy Tarreau wrote:
>>> On Thu, Feb 23, 2012 at 10:32:39AM -0600, Zhong Yu wrote:
>>>>>  When an HTTP/1.1 server accepts an HTTP/1.0 request, should the server
>>>>>  always close the connection after sending the response? That seems to
>>>>>  be the safest way. While the server could try to keep the connection
>>>>>  by checking for Connection: keep-alive, the spec suggests that it is
>>>>>  problematic. What's your recommended best practice for this issue?
>>> In haproxy we check for "Connection: keep-alive" in 1.0 and
>>> "Connection: close" in 1.1 and I've never had any report of
>>> unexpected behaviour by doing so.
>> Same thing for the Cherokee Web Server. I believe it's the behavior that
>> most of the servers and proxies implement.
>> All the best,
>> Alvaro
Received on Thursday, 23 February 2012 18:28:07 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 March 2016 11:11:00 UTC