wireshark抓包curl发送http2请求
环境介绍
- 抓包所在电脑:wsl2,ip是172.19.184.81
- wls2安装的是ubuntu,需安装curl命令
- 抓包目标机器:
http://nghttp2.org
,ip是139.162.123.134 - 虽然是http2,但是不带tls,所以协议还是http
抓包过程
用curl发起不带tls的http2请求,请求类型是HEAD
# curl --http2-prior-knowledge -I "http://nghttp2.org"
HTTP/2 200
date: Mon, 27 Dec 2021 01:57:56 GMT
content-type: text/html
last-modified: Tue, 19 Oct 2021 10:18:15 GMT
etag: "616e9b67-19d8"
accept-ranges: bytes
content-length: 6616
x-backend-header-rtt: 0.002868
server: nghttpx
alt-svc: h3=":443"; ma=3600, h3-29=":443"; ma=3600
via: 2 nghttpx
x-frame-options: SAMEORIGIN
x-xss-protection: 1; mode=block
x-content-type-options: nosniff
可以看到抓包如下:
本作品采用《CC 协议》,转载必须注明作者和本文链接