* WGs marked with an * asterisk has had at least one new draft made available during the last 5 days

Ticket #158 (closed design: fixed)

Opened 6 years ago

Last modified 3 years ago

Keep-Alive and Proxy-Connection headers

Reported by: mnot@pobox.com Owned by: mnot@pobox.com
Priority: normal Milestone: 18
Component: p1-messaging Severity: Active WG Document
Keywords: Cc:
Origin: http://www.w3.org/mid/49B4B649.6060409@qbik.com


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

comment:1 Changed 5 years ago by mnot@pobox.com

  • Priority set to normal

Keep-Alive is documented in RFC2068

comment:2 Changed 4 years ago by mnot@pobox.com

Mozilla bug about keep-alive syntax:


comment:3 Changed 4 years ago by mnot@pobox.com

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


comment:4 Changed 4 years ago by mnot@pobox.com

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 4 years ago by mnot@pobox.com

  • Owner set to mnot@pobox.com

comment:6 Changed 4 years ago by mnot@pobox.com

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

comment:7 Changed 4 years ago by mnot@pobox.com

  • Milestone changed from unassigned to 18

comment:8 Changed 3 years ago by julian.reschke@gmx.de

See [1492]

comment:9 Changed 3 years ago by mnot@pobox.com

  • Status changed from closed to reopened
  • Resolution incorporated deleted

comment:10 Changed 3 years ago by mnot@pobox.com

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