Más contenido relacionado La actualidad más candente (20) Más de Yahoo!デベロッパーネットワーク (20) HTTP/2 入門5. 現在までの流流れ
2012/01: IETF HTTPbis WGで次世代のHTTPの話が出始める
2012/06: HTTP/2の議論論を開始するための草案が提出される
2012/11: SPDYを議論論の開始点として策定が始まる
2013/01: 最初の草案がリリースされる
2013/08: 最初の実装向け草案がリリースされる
2014/05: <今はココ!>
2014/07: 最終草案リリース (WGラストコール) (予定)
9. よくある質問
This document addresses these issues by
defining an optimized mapping of HTTP's
semantics to an underlying connection.
“
― HTTP/2 Draft, Introduction
13. Application Layer Protocol Negotiation (ALPN)
SSL ハンドシェイク
クライアント サーバー
ClientHello
ServerHello
ALPN Extension
HTTP/1
SPDY/3
h2
ALPN Extension
Selected Protocol
h2
14. HTTP Upgrade
HTTP Upgrade
クライアント サーバー
リクエスト
レスポンス
GET /index.html HTTP/1.1
Host: www.yahoo.co.jp
Connection: Upgrade, HTTP2-Settings
Upgrade: h2c
HTTP2-Settings: 4389978938ab379
HTTP/1.1 101 Switching Protocols
Connection: Upgrade
Upgrade: h2c
!
<HTTP/2 データ....>
16. バイナリフレーム
POST /upload HTTP/1.1
Host: www.yahoo.co.jp
Content-Type: image/jpeg
Content-Length: 123
!
{バイナリデータ}
HTTP/1.1 リクエスト HTTP/2 フレーム
HEADERS
:method: POST
:scheme: http
:authority: www.yahoo.co.jp
:path: /upload
content-‐‑‒type: image/jpeg
content-‐‑‒length: 123
DATA
{バイナリデータ}
17. バイナリフレーム
HTTP/1.1 200 OK
Content-Type: image/jpeg
Content-Length: 123
!
{バイナリデータ}
HTTP/1.1 レスポンス HTTP/2 フレーム
HEADERS
:status: 200
content-‐‑‒type: image/jpeg
content-‐‑‒length: 123
DATA
{バイナリデータ}
18. バイナリフレーム
フレームヘッダー
0 1 2 3!
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1!
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+!
| R | Length (14) | Type (8) | Flags (8) |!
+-+-+-----------+---------------+-------------------------------+!
|R| Stream Identifier (31) |!
+-+-------------------------------------------------------------+!
| Frame Payload (0...) ...!
+---------------------------------------------------------------+
0 1 2 3!
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1!
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+!
| Pad High? (8) | Pad Low? (8) |!
+-+-------------+---------------+-------------------------------+!
|E| Stream Dependency? (31) |!
+-+-------------+-----------------------------------------------+!
| Weight? (8) |!
+---------------+-----------------------------------------------+!
| Header Block Fragment (*) ...!
+---------------------------------------------------------------+!
| Padding (*) ...!
+---------------------------------------------------------------+
HEADERSフレーム ペイロード
24. HPACK
:method: GET
:scheme: http
:path: /
:authority: www.yahoo.co.jp
user-agent: chrome
送信するヘッダー (1回⽬目)
エンコード済みヘッダー
1
2
3
4: www.yahoo.co.jp
user-agent: chrome
③エンコード
Reference Set
なし
①差分確認
Static Table
ID ヘッダー名 値
1 :method GET
2 :scheme http
3 :path /
4 :authority
②検索索
25. HPACK
:method: GET
:scheme: http
:path: /css/yahoo.css
:authority: www.yahoo.co.jp
user-agent: chrome
custom: yahoo
送信するヘッダー (2回⽬目)
エンコード済みヘッダー
3: /css/yahoo.css
custom: yahoo
③エンコード
Static Table
ID ヘッダー名 値
1 :method GET
2 :scheme http
3 :path /
4 :authority
②検索索
Reference Set
①差分確認
:method: GET
:scheme: http
:path: /
:authority: www.yahoo.co.jp
user-agent: chrome