菜单
  
    A client that makes a request for an "HTTP" URI without prior knowledge about support for HTTP/2 on the next hop uses the HTTP Upgrade mechanism (Section 6.7 of [RFC7230]). The client does so by making an HTTP/1.1 request that includes an Upgrade header field with the "h2c" token. Such an HTTP/1.1 request MUST include exactly one HTTP2-Settings (Section 3.2.1) header field. 31570
    For example:
    GET / HTTP/1.1
    Host: server.example.com
    Connection: Upgrade, HTTP2-Settings
    Upgrade: h2c
    HTTP2-Settings: <base64url encoding of HTTP/2 SETTINGS payload>

    Requests that contain an payload body MUST be sent in their entirety before the client can send HTTP/2 frames. This means that a large request can block the use of the connection until it is completely sent.
    If concurrency of an initial request with subsequent requests is important, an OPTIONS request can be used to perform the upgrade to HTTP/2, at the cost of an additional round-trip.
    A server that does not support HTTP/2 can respond to the request as though the Upgrade header field were absent:
    HTTP/1.1 200 OK 论文网
    Content-Length: 243
    Content-Type: text/html
    ...
    A server MUST ignore an "h2" token in an Upgrade header field. Presence of a token with "h2" implies HTTP/2 over TLS, which is instead negotiated as described in Section 3.3.
    A server that supports HTTP/2 accepts the upgrade with a 101 (Switching Protocols) response. After the empty line that terminates the 101 response, the server can begin sending HTTP/2 frames. These frames MUST include a response to the request that initiated the Upgrade.
    For example:
    HTTP/1.1 101 Switching Protocols
    Connection: Upgrade
    Upgrade: h2c

    [ HTTP/2 connection ...
    The first HTTP/2 frame sent by the server MUST be a SETTINGS frame (Section 6.5) as the server connection preface (Section 3.5). Upon receiving the 101 response, the client MUST send a connection preface (Section 3.5), which includes a SETTINGS frame.
    The HTTP/1.1 request that is sent prior to upgrade is assigned a stream identifier of 1 (see Section 5.1.1) with default priority values (Section 5.3.5). Stream 1 is implicitly "half closed" from the client toward the server (see Section 5.1), since the request is completed as an HTTP/1.1 request. After commencing the HTTP/2 connection, stream 1 is used for the response.
    3.2.1 HTTP2-Settings Header Field
    A request that upgrades from HTTP/1.1 to HTTP/2 MUST include exactly one HTTP2-Settings header field. The HTTP2-Settings header field is a connection-specific header field that includes parameters that govern the HTTP/2 connection, provided in anticipation of the server accepting the request to upgrade.
    HTTP2-Settings    = token68
    A server MUST NOT upgrade the connection to HTTP/2 if this header field is not present, or if more than one is present. A server MUST NOT send this header field.
    The content of the HTTP2-Settings header field is the payload of a SETTINGS frame (Section 6.5), encoded as a base64url string (that is, the URL- and filename-safe Base64 encoding described in Section 5 of [RFC4648], with any trailing '=' characters omitted). The ABNF [RFC5234] production for token68 is defined in Section 2.1 of [RFC7235].
    Since the upgrade is only intended to apply to the immediate connection, a client sending HTTP2-Settings MUST also send HTTP2-Settings as a connection option in the Connection header field to prevent it from being forwarded (see Section 6.1 of [RFC7230]).
    A server decodes and interprets these values as it would any other SETTINGS frame. Explicit acknowledgement of these settings (Section 6.5.3) is not necessary, since a 101 response serves as implicit acknowledgment. Providing these values in the Upgrade request gives a client an opportunity to provide parameters prior to receiving any frames from the server.
    Hypertext Transfer Protocol version 2
  1. 上一篇:酰胺类化合物文献综述
  2. 下一篇:二维码文献综述及参考文献
  1. 采暖通风暖通空调系统英文文献和中文翻译

  2. 服务机器人系统英文文献和中文翻译

  3. 数控车床主轴箱优化设计英文文献和中文翻译

  4. 建筑结构控制英文文献和中文翻译

  5. 声源定位技术文献综述和英文参考文献

  6. 暖通空调系统英文文献及中文翻译

  7. 营改增对现代服务业影响...

  8. 高警觉工作人群的元情绪...

  9. 浅析中国古代宗法制度

  10. 现代简约美式风格在室内家装中的运用

  11. 江苏省某高中学生体质现状的调查研究

  12. 中国传统元素在游戏角色...

  13. NFC协议物理层的软件实现+文献综述

  14. 巴金《激流三部曲》高觉新的悲剧命运

  15. 上市公司股权结构对经营绩效的影响研究

  16. C++最短路径算法研究和程序设计

  17. g-C3N4光催化剂的制备和光催化性能研究

  

About

优尔论文网手机版...

主页:http://www.youerw.com

关闭返回