Dumpしたパケットの内容をテキストで見る
code:show.sh
tcpdump -i any port 80 -s0 -r http.cap -A -p | less
見れるパケット例。gzip圧縮されていると実質的に読めないので注意が必要。
このようにchunked responseかどうか、ヘッダとして何が付いてきているかみたいなことも分かる。
code:dump.txt
`......@...................................P.....].............
x...x...GET /server-status/json HTTP/1.1
Host: localhost:80
User-Agent: mackerel-plugin-h2o
Accept-Encoding: gzip
`.... .@.................................P...]...........(.....
x...x...
`......@.................................P...].................
x...x...HTTP/1.1 200 OK
Date: Mon, 09 Aug 2021 02:28:00 GMT
Connection: keep-alive
Server: h2o/2.2.6
content-type: text/plain; charset=utf-8
cache-control: no-cache, no-store
x-content-type-options: nosniff
x-frame-options: DENY
content-encoding: gzip
vary: accept-encoding
accept-ranges: none
transfer-encoding: chunked
370
...........VAo.:...W......8.}.a.0.0`..;....=..dym7.....P...C...(~$E...JVI:(.]Y...6]Z%..D.K..3............?&".f...GkU...g..y.~3.......J.*...x..7.jp.....?..l.....C....n..Pl8.uR...M....#Z..S5....#t........V...................u...j.. &v......6B".~Y%...1..CZUyz..#......p....../..\.8.
Q..a....\c.....{..K..q=.......... h... .m.q.6-.....Z.....Ge.P00&..>...!k....O.c.0.m..=).s....a....r....g.q.]R.55............L.../.......E3....zu......*H.o.\..&,..O.{......#..nX..k....R!...3....9.....<..\...6V...]+.].3.\.......L{....vOJ...v.v.."...l.....o1...5.lq...O....8ES.2e..C..EP%~._..[...=.z.[....0....|.'.[..\..q..?.%.K;.[.f.......a.w....y............i..3.......[3.|.....b......a{....y.6..ju#...{........:.Yu..f/f.....7....o.t.........L.<.k......=.."..........@...o..\...q..D'+X..R%..$..%..%..%...&).H.0.!.D.#..*..OZ..D#$.GH
..
0