ClientHello
message.
GET /page HTTP/1.1 Host: server.example.com Connection: Upgrade, HTTP2-Settings Upgrade: h2c HTTP2-Settings: (SETTINGS payload) HTTP/1.1 200 OK Content-length: 243 Content-type: text/html (... HTTP/1.1 response ...) (or) HTTP/1.1 101 Switching Protocols Connection: Upgrade Upgrade: h2c (... HTTP/2 response ...)
length
– 24 bits, allows a frame to carry 224 bytes of data.
type
– 8 bits, determines the format and semantics of the frame.DATA
, HEADERS
, PRIORITY
,
RST_STREAM
, SETTINGS
,
PUSH_PROMISE
, PING
, GOAWAY
,
WINDOW_UPDATE
, CONTINUATION
flags
– 8 bits, defines frame-type specific boolean flags.stream identifier
– 31 bits, uniquely identifies the HTTP/2 stream.231
GOAWAY
frame to initialize a new
TCP connection, and the stream ID is reset.END_STREAM
flag is not set)
doc.write
and block DOM parsing and construction4 + 12 = 16
A = 12/16
,
B = 4/16
A
receives 3/4
and stream B
receives
1/4
of available resources;SETTINGS
and WINDOW_UPDATE
framesWINDOW_UPDATE
provides an increment of the current window size.PUSH_PROMISE
framesPUSH_PROMISE
RST_STREAM
frame)http2-express-autopush
server { # Ensure that HTTP/2 is enabled for the server listen 443 ssl http2; ssl_certificate ssl/certificate.pem; ssl_certificate_key ssl/key.pem; root /var/www/html; # whenever a client requests demo.html, also push # /style.css, /image1.jpg and /image2.jpg location = /demo.html { http2_push /style.css; http2_push /image1.jpg; http2_push /image2.jpg; } }
HTML size > BDP
61
header fiedls and values where each has assigned an
index10
bytes (name+value
length)1
byte.
62
nghttp
displays frames and a summary information about each frame$ nghttp -vvv -n https://w20.vitvar.com/lecture1.html [ 0.071] Connected The negotiated protocol: h2 [ 0.137] send SETTINGS frame(niv=2) [SETTINGS_MAX_CONCURRENT_STREAMS(0x03):100] [SETTINGS_INITIAL_WINDOW_SIZE(0x04):65535] [ 0.137] send PRIORITY frame (dep_stream_id=0, weight=201, exclusive=0) [ 0.137] send PRIORITY frame (dep_stream_id=0, weight=101, exclusive=0) [ 0.137] send PRIORITY frame (dep_stream_id=0, weight=1, exclusive=0) [ 0.137] send PRIORITY frame (dep_stream_id=7, weight=1, exclusive=0) [ 0.137] send PRIORITY frame (dep_stream_id=3, weight=1, exclusive=0) [ 0.137] send HEADERS frame ; END_STREAM | END_HEADERS | PRIORITY (padlen=0, dep_stream_id=11, weight=16, exclusive=0) ; Open new stream :method: GET :path: /lecture1.html :scheme: https :authority: w20.vitvar.com accept: */* accept-encoding: gzip, deflate user-agent: nghttp2/1.42.0 [ 0.180] recv SETTINGS frame (niv=1) [SETTINGS_MAX_CONCURRENT_STREAMS(0x03):100] [ 0.180] recv WINDOW_UPDATE frame (window_size_increment=16711681) [ 0.180] recv SETTINGS frame ; ACK (niv=0) [ 0.180] recv (stream_id=13) :status: 200 [ 0.180] recv (stream_id=13) server: GitHub.com ...
https://kde.vitvar.com
SSLKEYLOGFILE
to point to a
file on the filesystemeth0
using the
filter:((dst host 185.199 and src host 192.168) or
(dst host 192.168 and src host 185.199))