- Mastering ASP.NET Web API
- Mithun Pattankar Malendra Hurbuns
- 239字
- 2021-07-02 20:52:25
Version 2 of HTTP
HTTP/2 is an optimization of HTTP 1.1. Many browsers already support HTTP/2; your Chrome browser does that already.
HTTP/2 is a combination of two specifications: Hypertext Transfer Protocol version 2 (RFC7540) and HPACK- Header Compression for HTTP2 (RFC7541).
When using HTTP/2 over Transport Layer Security (TLS), "h2" is used to indicate the protocol.
The "h2c" string is used when HTTP/2 is used over clear text TCP or when HTTP.1.1 upgrades.
An example of a GET request is as follows:
Host: server.example.com
Connection: Upgrade, HTTP2-Settings
Upgrade: h2c
HTTP2-Settings: <base64url encoding of HTTP/2 SETTINGS payload>
-RCF 7540 Section 3.2
This request is from a client that does not know whether HTTP/2 is supported. It makes a HTTP 1.1 request, but includes an upgrade field in the header, "h2c", and at least one HTTP2-Settings header field:
HTTP/1.1 200 OK
Content-Length: 243
Content-Type: text/html
-RCF 7540 Section 3.2
This looks like a regular HTTP/1.1 response:
HTTP/1.1 101 Switching Protocols
Connection: Upgrade
Upgrade: h2c
[ HTTP/2 connection ...
-RCF 7540 Section 3.2
A frame is introduced as basis unit in HTTP2. You can think of a frame as a packet that is transferred over the wire. For requests and responses, the HEADER and DATA frames are used as the building blocks, and for HTTP/2 features, the frames are SETTINGS, WINDOWS_UPDATE, and PUSH_PROMISE.
- Puppet 4 Essentials(Second Edition)
- Azure IoT Development Cookbook
- 深入淺出Java虛擬機:JVM原理與實戰
- Python機器學習經典實例
- 零基礎輕松學SQL Server 2016
- Python數據結構與算法(視頻教學版)
- 西門子S7-200 SMART PLC編程從入門到實踐
- RESTful Java Web Services(Second Edition)
- 響應式Web設計:HTML5和CSS3實戰(第2版)
- Mastering Python Design Patterns
- 編程改變生活:用Python提升你的能力(進階篇·微課視頻版)
- Python語言科研繪圖與學術圖表繪制從入門到精通
- 分布式數據庫原理、架構與實踐
- 游戲設計的底層邏輯
- Python全棧開發:數據分析