这种HTTP格式是什么?

时间:2018-01-30 18:21:42

标签: http charles-proxy sniffing

我正在使用Charles代理进行一些实验,我发现了一个看起来像这样的HTTP请求:

:method: POST
:path: /accounts/login/ajax/
:authority: www.instagram.com
:scheme: https
accept-encoding: deflate
accept-language: ko-KR,ko;q=0.8,en-US;q=0.6,en;q=0.4
origin: https://www.instagram.com
referer: https://www.instagram.com
user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/603.2.4 (KHTML, like Gecko) Version/10.1.1 Safari/603.2.4
x-instagram-ajax: 1
x-requested-with: XMLHttpRequest
x-csrftoken: DYQiMZCtYEmxnSh4JOxPhXC2g7U3MT99
content-type: application/x-www-form-urlencoded; charset=utf-8
content-length: 33
cookie: rur=FRC; csrftoken=DYQiMZCtYEmxnSh4JOxPhXC2g7U3MT99; mid=WnCy2AAEAAGEdFpqRSkUCaeSSznE

username=blabla&password=blabla

据我所知,标准HTTP请求的第一行应该类似于POST / HTTP/1.1,但它不是。

我不明白为什么它在前4行前面有:,为什么它甚至有#2~4行。

有关此类HTTP的任何信息,或者是Charles代理的信息吗?

1 个答案:

答案 0 :(得分:1)

这是 HTTP2 请求,带分号的那些行称为伪标题

进一步阅读:http://undertow.io/blog/2015/04/27/An-in-depth-overview-of-HTTP2.html#_request_response_overview