This is pretty darn useful for developing / testing H2:

        https://github.com/bradfitz/http2/tree/master/h2i 
<https://github.com/bradfitz/http2/tree/master/h2i>



Install it with e.g.

        go get github.com/bradfitz/http2/h2i 
<http://github.com/bradfitz/http2/h2i>


Cheers,

— leif

Example:

odin (17:21) 948/1 $ ~/gocode/bin/h2i docs.trafficserver.apache.org
Connecting to docs.trafficserver.apache.org:443 ...
Connected to 104.239.143.16:443
Negotiated protocol "h2"
[FrameHeader SETTINGS len=36]
  [HEADER_TABLE_SIZE = 4096]
  [ENABLE_PUSH = 0]
  [MAX_CONCURRENT_STREAMS = 100]
  [INITIAL_WINDOW_SIZE = 1048576]
  [MAX_FRAME_SIZE = 16384]
  [MAX_HEADER_LIST_SIZE = 4294967295]
[FrameHeader WINDOW_UPDATE len=4]
  Window-Increment = 983041

h2i> headers
(as HTTP/1.1)> GET /en/latest/ HTTP/1.1
(as HTTP/1.1)> Host: docs.trafficserver.apache.org
(as HTTP/1.1)>
Opening Stream-ID 1:
 :authority = docs.trafficserver.apache.org
 :method = GET
 :path = /en/latest/
 :scheme = https
[FrameHeader HEADERS flags=END_HEADERS stream=1 len=388]
  :status = "200" (SENSITIVE)
  :status = "200"
  server = "ATS/6.0.0"
  date = "Thu, 30 Jul 2015 23:21:27 GMT"
  content-type = "text/html"
  content-length = "188027"
  last-modified = "Thu, 30 Jul 2015 20:32:08 GMT"
  vary = "Accept-Encoding"
  etag = "\"55ba89c8-2de7b\""
  x-served = "Nginx"
  x-subdomain-tryfiles = "True"
  x-deity = "web03"
  accept-ranges = "bytes"
  age = "21"
  strict-transport-security = "max-age=86400"
  via = "https/1.1 ATS (ApacheTrafficServer/6.0.0 [cHs f ])"
[FrameHeader DATA stream=1 len=8183]

Reply via email to