You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by "Roy T. Fielding" <fi...@liege.ICS.UCI.EDU> on 1996/06/11 01:26:07 UTC

stayin' alive

> question for Roy; we are a HTTP/1.0 server that wants to allow
> HTTP/1.1 clients to connect to us and have persistent connections. Can
> we do that?

Yes.  Any HTTP/1.1 client that wants to get a persistent connection from
a 1.0 server will send keep-alive in the Connection header field.  If it
doesn't, that means *it doesn't want a keep-alive with a 1.0 server*.
Why it wouldn't want that is not known (it may be a future
bugward-compatibility problem of which we are not yet aware), but we
should respect the client's wish.

> The current apache-XX sends Connection: Keep-Alive back to the client
> in all cases, which I'm quite sure is wrong - it should only do this
> for HTTP/1.0 requests that had a Connection: Keep-Alive.

That is a bug.  It needs to be fixed.

> And we can't
> do nothing, because then the client will assume that we're not
> persistent-capable, and will wait forever for the connection to close.

We shouldn't be in persistent-connection mode unless the client has
specifically asked for it (for HTTP/1.1, the version number is what
asks for it, with Connection: close being the override).

Likewise, we should not send Connection: keep-alive, and for HTTP/1.1
will send Connection: close, when we are not in persistent-connection mode.

This is not optional, since the client may be waiting for the close
in order to know it has received all of the content, and thus defaulting
to keep-alive when the client has not requested keep-alive is a bug.

......Roy