Bootstrapping WebSockets with HTTP/2
draft-mcmanus-httpbis-h2-websockets-02
|
Document |
Type |
|
Active Internet-Draft (httpbis WG)
|
|
Last updated |
|
2017-12-13
(latest revision 2017-11-12)
|
|
Stream |
|
IETF
|
|
Intended RFC status |
|
(None)
|
|
Formats |
|
plain text
xml
pdf
html
bibtex
|
Stream |
WG state
|
|
Adopted by a WG
|
|
Document shepherd |
|
Mark Nottingham
|
IESG |
IESG state |
|
I-D Exists
|
|
Consensus Boilerplate |
|
Unknown
|
|
Telechat date |
|
|
|
Responsible AD |
|
(None)
|
|
Send notices to |
|
Mark Nottingham <mnot@mnot.net>
|
Network Working Group P. McManus
Internet-Draft Mozilla
Intended status: Standards Track November 11, 2017
Expires: May 15, 2018
Bootstrapping WebSockets with HTTP/2
draft-mcmanus-httpbis-h2-websockets-02
Abstract
This document defines a mechanism for running the WebSocket Protocol
[RFC6455] over a single stream of an HTTP/2 connection.
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 https://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 May 15, 2018.
Copyright Notice
Copyright (c) 2017 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
(https://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.
McManus Expires May 15, 2018 [Page 1]
Internet-Draft I-D November 2017
Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2
2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 3
3. The ENABLE_CONNECT_PROTOCOL SETTINGS Parameter . . . . . . . 3
4. The Extended CONNECT Method . . . . . . . . . . . . . . . . . 3
5. Using Extended CONNECT To Bootstrap The WebSocket Protocol . 4
5.1. Example . . . . . . . . . . . . . . . . . . . . . . . . . 5
6. Design Considerations . . . . . . . . . . . . . . . . . . . . 5
7. About Intermediaries . . . . . . . . . . . . . . . . . . . . 5
8. Security Considerations . . . . . . . . . . . . . . . . . . . 6
9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 6
10. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 6
11. Normative References . . . . . . . . . . . . . . . . . . . . 6
Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 7
1. Introduction
The Hypertext Transfer Protocol (HTTP) provides compatible resource
level semantics across different versions but it does not offer
compatibility at the connection management level. Other protocols,
such as WebSockets, that rely on connection management details of
HTTP must be updated for new versions of HTTP.
The WebSocket Protocol [RFC6455] uses the HTTP/1.1 [RFC7230] Upgrade
mechanism to transition a TCP connection from HTTP into a WebSocket
connection. A different approach must be taken with HTTP/2
[RFC7540]. The multiplexing nature of HTTP/2 does not allow
connection wide header and status codes such as the Upgrade and
Connection request headers or the 101 response code due to its
multiplexing nature. These are all required by the [RFC6455] opening
handshake.
Being able to bootstrap WebSockets from HTTP/2 allows one TCP
connection to be shared by both protocols and extends HTTP/2's more
efficient use of the network to WebSockets.
This document extends the HTTP/2 CONNECT method. The extension
allows the substitution of a new protocol name to connect to rather
than the external host normally used by CONNECT. The result is a
tunnel on a single HTTP/2 stream that can carry data for WebSockets
(or any other protocol). The other streams on the connection may
carry more extended CONNECT tunnels, traditional HTTP/2 data, or a
mixture of both.
This tunneled stream will be multiplexed with other regular streams
on the connection and enjoys the normal priority, cancellation, and
flow control features of HTTP/2.
McManus Expires May 15, 2018 [Page 2]
Internet-Draft I-D November 2017
Streams that successfully establish a WebSocket connection using a
tunneled stream and the modifications to the opening handshake
defined in this document then use the traditional WebSocket Protocol
Show full document text