没有合适的资源?快使用搜索试试~ 我知道了~
首页http2.0 RFC文档
http2.0 RFC文档
需积分: 9 12 下载量 111 浏览量
更新于2023-05-26
评论
收藏 4.97MB PDF 举报
http2.0 RFC pdf 文档,英文原版,震撼上传, good luck for you
资源详情
资源评论
资源推荐
HTTPbis Working Group M. Belshe
Internet-Draft BitGo
Intended status: Standards Track R. Peon
Expires: December 1, 2015 Google, Inc
M. Thomson, Editor
Mozilla
May 30, 2015
Hypertext Transfer Protocol Version 2 (HTTP/2)
draft-ietf-httpbis-http2-latest
Abstract
This specification describes an optimized expression of the semantics of the Hypertext Transfer
Protocol (HTTP), referred to as HTTP version 2 (HTTP/2). HTTP/2 enables a more efficient use of
network resources and a reduced perception of latency by introducing header field compression and
allowing multiple concurrent exchanges on the same connection. It also introduces unsolicited push of
representations from servers to clients.
This specification is an alternative to, but does not obsolete, the HTTP/1.1 message syntax. HTTP's
existing semantics remain unchanged.
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 December 1, 2015.
Copyright Notice
Copyright © 2015 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
2.HTTP/2 Protocol Overview
2.1Document Organization
2.2Conventions and Terminology
3.Starting HTTP/2
3.1HTTP/2 Version Identification
3.2Starting HTTP/2 for "http" URIs
3.2.1HTTP2-Settings Header Field
3.3Starting HTTP/2 for "https" URIs
3.4Starting HTTP/2 with Prior Knowledge
3.5HTTP/2 Connection Preface
4.HTTP Frames
4.1Frame Format
4.2Frame Size
4.3Header Compression and Decompression
5.Streams and Multiplexing
5.1Stream States
5.1.1Stream Identifiers
5.1.2Stream Concurrency
5.2Flow Control
5.2.1Flow-Control Principles
5.2.2Appropriate Use of Flow Control
5.3Stream Priority
5.3.1Stream Dependencies
5.3.2Dependency Weighting
5.3.3Reprioritization
5.3.4Prioritization State Management
5.3.5Default Priorities
5.4Error Handling
5.4.1Connection Error Handling
5.4.2Stream Error Handling
5.4.3Connection Termination
5.5Extending HTTP/2
6.Frame Definitions
6.1DATA
6.2HEADERS
6.3PRIORITY
6.4RST_STREAM
6.5SETTINGS
6.5.1SETTINGS Format
6.5.2Defined SETTINGS Parameters
6.5.3Settings Synchronization
6.6PUSH_PROMISE
6.7PING
6.8GOAWAY
6.9WINDOW_UPDATE
6.9.1The Flow-Control Window
6.9.2Initial Flow-Control Window Size
6.9.3Reducing the Stream Window Size
6.10CONTINUATION
7.Error Codes
8.HTTP Message Exchanges
8.1HTTP Request/Response Exchange
8.1.1Upgrading from HTTP/2
8.1.2HTTP Header Fields
8.1.3Examples
8.1.4Request Reliability Mechanisms in HTTP/2
8.2Server Push
8.2.1Push Requests
8.2.2Push Responses
8.3The CONNECT Method
9.Additional HTTP Requirements/Considerations
9.1Connection Management
9.1.1Connection Reuse
9.1.2The 421 (Misdirected Request) Status Code
9.2Use of TLS Features
9.2.1TLS 1.2 Features
9.2.2TLS 1.2 Cipher Suites
10.Security Considerations
10.1Server Authority
10.2Cross-Protocol Attacks
10.3Intermediary Encapsulation Attacks
10.4Cacheability of Pushed Responses
10.5Denial-of-Service Considerations
10.5.1Limits on Header Block Size
10.5.2CONNECT Issues
10.6Use of Compression
10.7Use of Padding
10.8Privacy Considerations
11.IANA Considerations
11.1Registration of HTTP/2 Identification Strings
11.2Frame Type Registry
11.3Settings Registry
11.4Error Code Registry
11.5HTTP2-Settings Header Field Registration
11.6PRI Method Registration
11.7The 421 (Misdirected Request) HTTP Status Code
11.8The h2c Upgrade Token
12.References
12.1Normative References
12.2Informative References
A.TLS 1.2 Cipher Suite Black List
Acknowledgements
Authors' Addresses
Figures
Figure 1: Frame Layout
Figure 2: Stream States
Figure 3: Example of Default Dependency Creation
Figure 4: Example of Exclusive Dependency Creation
Figure 5: Example of Dependency Reordering
Figure 6: DATA Frame Payload
Figure 7: HEADERS Frame Payload
Figure 8: PRIORITY Frame Payload
Figure 9: RST_STREAM Frame Payload
Figure 10: Setting Format
Figure 11: PUSH_PROMISE Payload Format
Figure 12: PING Payload Format
Figure 13: GOAWAY Payload Format
Figure 14: WINDOW_UPDATE Payload Format
Figure 15: CONTINUATION Frame Payload
1.Introduction
The Hypertext Transfer Protocol (HTTP) is a wildly successful protocol. However, the way HTTP/1.1
uses the underlying transport ([RFC7230], Section 6) has several characteristics that have a negative
overall effect on application performance today.
In particular, HTTP/1.0 allowed only one request to be outstanding at a time on a given TCP
connection. HTTP/1.1 added request pipelining, but this only partially addressed request concurrency
and still suffers from head-of-line blocking. Therefore, HTTP/1.0 and HTTP/1.1 clients that need to
make many requests use multiple connections to a server in order to achieve concurrency and thereby
reduce latency.
Furthermore, HTTP header fields are often repetitive and verbose, causing unnecessary network traffic
as well as causing the initial TCP [TCP] congestion window to quickly fill. This can result in excessive
latency when multiple requests are made on a new TCP connection.
HTTP/2 addresses these issues by defining an optimized mapping of HTTP's semantics to an
underlying connection. Specifically, it allows interleaving of request and response messages on the
same connection and uses an efficient coding for HTTP header fields. It also allows prioritization of
requests, letting more important requests complete more quickly, further improving performance.
The resulting protocol is more friendly to the network because fewer TCP connections can be used in
comparison to HTTP/1.x. This means less competition with other flows and longer-lived connections,
which in turn lead to better utilization of available network capacity.
Finally, HTTP/2 also enables more efficient processing of messages through use of binary message
framing.
2.HTTP/2 Protocol Overview
HTTP/2 provides an optimized transport for HTTP semantics. HTTP/2 supports all of the core features
of HTTP/1.1 but aims to be more efficient in several ways.
The basic protocol unit in HTTP/2 is a frame (Section4.1). Each frame type serves a different purpose.
For example, HEADERS and DATA frames form the basis of HTTP requests and responses
(Section8.1); other frame types like SETTINGS, WINDOW_UPDATE, and PUSH_PROMISE are used
in support of other HTTP/2 features.
Multiplexing of requests is achieved by having each HTTP request/response exchange associated with
its own stream (Section5). Streams are largely independent of each other, so a blocked or stalled
request or response does not prevent progress on other streams.
Flow control and prioritization ensure that it is possible to efficiently use multiplexed streams. Flow
control (Section5.2) helps to ensure that only data that can be used by a receiver is transmitted.
Prioritization (Section5.3) ensures that limited resources can be directed to the most important streams
first.
HTTP/2 adds a new interaction mode whereby a server can push responses to a client (Section8.2).
Server push allows a server to speculatively send data to a client that the server anticipates the client
will need, trading off some network usage against a potential latency gain. The server does this by
synthesizing a request, which it sends as a PUSH_PROMISE frame. The server is then able to send a
response to the synthetic request on a separate stream.
Because HTTP header fields used in a connection can contain large amounts of redundant data,
frames that contain them are compressed (Section4.3). This has especially advantageous impact upon
request sizes in the common case, allowing many requests to be compressed into one packet.
client:
connection:
connection error:
endpoint:
frame:
peer:
receiver:
sender:
server:
stream:
stream error:
2.1Document Organization
The HTTP/2 specification is split into four parts:
Starting HTTP/2 (Section3) covers how an HTTP/2 connection is initiated.
The frame (Section4) and stream (Section5) layers describe the way HTTP/2 frames are
structured and formed into multiplexed streams.
Frame (Section6) and error (Section7) definitions include details of the frame and error types
used in HTTP/2.
HTTP mappings (Section8) and additional requirements (Section9) describe how HTTP
semantics are expressed using frames and streams.
While some of the frame and stream layer concepts are isolated from HTTP, this specification does not
define a completely generic frame layer. The frame and stream layers are tailored to the needs of the
HTTP protocol and server push.
2.2Conventions and Terminology
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD
NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as
described in RFC 2119 [RFC2119].
All numeric values are in network byte order. Values are unsigned unless otherwise indicated. Literal
values are provided in decimal or hexadecimal as appropriate. Hexadecimal literals are prefixed with
0x to distinguish them from decimal literals.
The following terms are used:
The endpoint that initiates an HTTP/2 connection. Clients send HTTP requests and receive
HTTP responses.
A transport-layer connection between two endpoints.
An error that affects the entire HTTP/2 connection.
Either the client or server of the connection.
The smallest unit of communication within an HTTP/2 connection, consisting of a header and a
variable-length sequence of octets structured according to the frame type.
An endpoint. When discussing a particular endpoint, "peer" refers to the endpoint that is remote
to the primary subject of discussion.
An endpoint that is receiving frames.
An endpoint that is transmitting frames.
The endpoint that accepts an HTTP/2 connection. Servers receive HTTP requests and send
HTTP responses.
A bidirectional flow of frames within the HTTP/2 connection.
An error on the individual HTTP/2 stream.
Finally, the terms "gateway", "intermediary", "proxy", and "tunnel" are defined in Section 2.3 of
[RFC7230]. Intermediaries act as both client and server at different times.
The term "payload body" is defined in Section 3.3 of [RFC7230].
3.Starting HTTP/2
An HTTP/2 connection is an application-layer protocol running on top of a TCP connection ([TCP]). The
client is the TCP connection initiator.
剩余59页未读,继续阅读
lixinyuan224
- 粉丝: 0
- 资源: 5
上传资源 快速赚钱
- 我的内容管理 收起
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
会员权益专享
最新资源
- zigbee-cluster-library-specification
- JSBSim Reference Manual
- c++校园超市商品信息管理系统课程设计说明书(含源代码) (2).pdf
- 建筑供配电系统相关课件.pptx
- 企业管理规章制度及管理模式.doc
- vb打开摄像头.doc
- 云计算-可信计算中认证协议改进方案.pdf
- [详细完整版]单片机编程4.ppt
- c语言常用算法.pdf
- c++经典程序代码大全.pdf
- 单片机数字时钟资料.doc
- 11项目管理前沿1.0.pptx
- 基于ssm的“魅力”繁峙宣传网站的设计与实现论文.doc
- 智慧交通综合解决方案.pptx
- 建筑防潮设计-PowerPointPresentati.pptx
- SPC统计过程控制程序.pptx
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0