Opened 10 years ago

Closed 8 years ago

#158 closed design (fixed)

Keep-Alive and Proxy-Connection headers

Reported by: mnot@… Owned by: mnot@…
Priority: normal Milestone: 18
Component: p1-messaging Severity: Active WG Document
Keywords: Cc:

Description

The Keep-Alive header is referred to in a few places, but not defined as a HTTP/1.1 header. This should be addressed (e.g., in an appendix).

Likewise, Proxy-Connection is still (!) in common use, but has been deprecated for at least a decade. A few words in an appendix may encourage implementers to stop this practice.

Change History (10)

comment:1 Changed 9 years ago by mnot@…

  • Priority set to normal

Keep-Alive is documented in RFC2068 19.7.1.1.

comment:2 Changed 9 years ago by mnot@…

Mozilla bug about keep-alive syntax:

https://bugzilla.mozilla.org/show_bug.cgi?id=643352

comment:3 Changed 8 years ago by mnot@…

... and bug in moz for removing proxy-connection:

https://bugzilla.mozilla.org/show_bug.cgi?id=570283

comment:4 Changed 8 years ago by mnot@…

Proposal - replace p1 A.1.2 with:

Most HTTP/1.0 implementations use a separate connection for each request. However, some implement persistent connections using the Keep-Alive negotiation mechanism described in Section 19.7.1 of [RFC2068].

In contrast, persistent connections are the default for HTTP/1.1; they do not need to be explicitly negotiated, as in HTTP/1.0. This is because there were various interoperability problems in the implementations of HTTP/1.0 persistent connections, especially when a proxy is involved.

For example, some existing HTTP/1.0 clients might send Keep-Alive to a proxy server that doesn't understand Connection, which would then erroneously forward it to the next inbound server, which would establish the Keep-Alive connection and result in a hung HTTP/1.0 proxy waiting for the close on the response. The result is that HTTP/1.0 clients must be prevented from using Keep-Alive when talking to proxies.

However, talking to proxies is the most important use of persistent connections, so that prohibition is clearly unacceptable. Some early attempts to correct this was to use the Proxy-Connection request header, but this approach was also unworkable, for similar reasons.

Therefore, some other mechanism for indicating a persistent connection was needed -- one that is safe to use even when talking to an old proxy that ignores Connection. Persistent connections are the default for HTTP/1.1 messages; we introduce a new keyword (Connection: close) for declaring non-persistence. See Section 8.1.

As a result, HTTP/1.1 clients ought not to send the Proxy-Connection or Keep-Alive header; at best, they will waste bytes in requests, and at worst they can cause interoperability problems.

comment:5 Changed 8 years ago by mnot@…

  • Owner set to mnot@…

comment:6 Changed 8 years ago by mnot@…

  • Resolution set to incorporated
  • Status changed from new to closed

comment:7 Changed 8 years ago by mnot@…

  • Milestone changed from unassigned to 18

comment:8 Changed 8 years ago by julian.reschke@…

See [1492]

comment:9 Changed 8 years ago by mnot@…

  • Resolution incorporated deleted
  • Status changed from closed to reopened

comment:10 Changed 8 years ago by mnot@…

  • Resolution set to fixed
  • Status changed from reopened to closed
Note: See TracTickets for help on using tickets.