Network Working Group W. Tarreau
Internet-Draft Exceliance
Expires: April 02, 2013 G. Montenegro
Microsoft
October 2012

HTTP 2.0 Negotiation
draft-montenegro-httpbis-http2-negotiation-00

Abstract

This document describes an Upgrade-based protocol negotiation proposal for HTTP 2.0.

Status of This Memo

This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.

Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet- Drafts is at http:/⁠/⁠datatracker.ietf.org/⁠drafts/⁠current/⁠.

Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."

This Internet-Draft will expire on April 02, 2013.

Copyright Notice

Copyright (c) 2012 IETF Trust and the persons identified as the document authors. All rights reserved.

This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http:/⁠/⁠trustee.ietf.org/⁠license-⁠info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.


Table of Contents

1. Introduction

HTTP/2.0 will have the capability (but not the requirement) to use the same ports as HTTP/1.X, typically, but not limited to, 80 (in the clear) and 443 (when over TLS/SSL). Of course, it is possible for a client to somehow acquire knowledge that a server implements HTTP/2.0 at a given port. In such a case, the client can immediately begin sending HTTP/2.0 binary frames to the server, and the server can immediately respond with the corresponding HTTP/2.0 frames. How that knowledge is acquired is not the subject of this note. It could be acquired by some out-of-band means such as using the DNS/DANE, or by some configuration prior to the HTTP/2.0 exchange. Or it could have been aquired earlier in-band in an earlier exchange. It could have been acquired at an earlier phase of this same exchange, for example, via TLS-NPN.

Nevertheless, there may be some situations, in which the client can only assume that a server speaks HTTP/1.X. In such cases, a connection upgrade mechanism to opportunistically attempt to HTTP/2.0 is essential. Otherwise, the exchange will remain at HTTP/1.X despite both client and server being able to speak HTTP/2.0.

This document specifies such a connection upgrade for HTTP/2.0. This handshake does not incur any extra delay in obtaining a response in HTTP/2.0, as the protocol switch is immediate and effective within the first round trip. There is no delay either if there is no protocol switch, as the server is capable to respond via HTTP/1.1 also within the first initial round trip.

This handshake uses the Upgrade header defined in HTTP/1.1 [I-D.ietf-httpbis-p1-messaging]. This Upgrade header is also in wide use by the WebSocket protocol for similar purposes [RFC6455].

The goal of this document is to propose additional text to the HTTP/2.0 specification. The starting point for HTTP/2.0, the SPDY [I-D.mbelshe-httpbis-spdy] protocol, has no language with respect to a connection upgrade procedure. Hence, the text below could be incorporated as a new section or sections within the HTTP/2.0 document.

2. Negotiation

If a client has no knowledge about a server's support for HTTP/2.0, it starts with HTTP/1.1 and attempt an upgrade to HTTP/2.0 as follows:

     GET /default.htm HTTP/1.1
     Host: server.example.com
     Connection: Upgrade
     Upgrade: HTTP/2.0
          

If the server does not support the new protocol, it will simply respond to the client using HTTP/1.1:

     HTTP/1.1 200 OK
     Content-length: 243
     Content-type: text/html
     ...
          

If the server switches to the new protocol, it will signal so via a 101 response. The server switches to HTTP/2.0 immediately after the empty line which terminates the 101 response [I-D.ietf-httpbis-p2-semantics].

     HTTP/1.1 101 Switching Protocols
     Connection: Upgrade
     Upgrade: HTTP/2.0

     [ HTTP/2.0 frame ] 
          

3. Optimizing the Handshake

This handshake may be further optimized by the definition of HTTP headers of the form "HTTP2-header_name". These "HTTP2" headers would be meant to be interpreted exclusively by HTTP/2.0 servers and applied upon a successful Upgrade to further optimize or proactively configure the subsequent HTTP/2.0 exchanges. These headers would be ignored by HTTP/1.1 servers. The HTTP2 headers are for future revisions of this document.

4. Acknowledgements

This document incorporates material from [I-D.tarreau-httpbis-network-friendly] and [I-D.montenegro-httpbis-speed-mobility].

This document was produced using the xml2rfc tool [RFC2629].

5. References

5.1. Normative References

[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997.
[RFC2616] Fielding, R., Gettys, J., Mogul, J., Frystyk, H., Masinter, L., Leach, P. and T. Berners-Lee, "Hypertext Transfer Protocol -- HTTP/1.1", RFC 2616, June 1999.
[I-D.ietf-httpbis-p1-messaging] Fielding, R, Gettys, J, Mogul, J, Nielsen, H, Masinter, L, Leach, P, Berners-Lee, T, Reschke, J and Y Lafon, "HTTP/1.1, part 1: URIs, Connections, and Message Parsing", Internet-Draft draft-ietf-httpbis-p1-messaging-16, August 2011.
[I-D.ietf-httpbis-p2-semantics] Fielding, R, Gettys, J, Mogul, J, Nielsen, H, Masinter, L, Leach, P, Berners-Lee, T, Reschke, J and Y Lafon, "HTTP/1.1, part 2: Message Semantics", Internet-Draft draft-ietf-httpbis-p2-semantics-16, August 2011.

5.2. Informative References

[RFC2629] Rose, M.T., "Writing I-Ds and RFCs using XML", RFC 2629, June 1999.
[RFC6455] Fette, I. and A. Melnikov, "The WebSocket Protocol", RFC 6455, December 2011.
[I-D.mbelshe-httpbis-spdy] Belshe, M and R Peon, "SPDY Protocol", Internet-Draft draft-mbelshe-httpbis-spdy-00, February 2012.
[I-D.montenegro-httpbis-speed-mobility] Trace, R, Foresti, A, Singhal, S, Mazahir, O, Nielsen, H, Raymor, B, Rao, R and G Montenegro, "HTTP Speed+Mobility", Internet-Draft draft-montenegro-httpbis-speed-mobility-02, June 2012.
[I-D.tarreau-httpbis-network-friendly] Tarreau, W, Jeffries, A and A Croy, "Proposal for a Network-Friendly HTTP Upgrade", Internet-Draft draft-tarreau-httpbis-network-friendly-00, March 2012.

Authors' Addresses

Willy Tarreau Exceliance EMail: w@1wt.eu
Gabriel Montenegro Microsoft EMail: Gabriel.Montenegro@microsoft.com