Common HTTP protocol request headers and response headers used include

Request header Request Header:

Accept:浏览器能够处理的内容类型
Accept-Charset: 浏览器能够显示的字符集
Accept-Encoding:申明自己接收及能够处理的编码方法,通常指定压缩方法,是否支持压缩,支持什么压缩方法
Accept-Language:浏览器 与服务器之间连接的类型
Cookie:当前页面设置所在的域
Host:浏览器告诉服务器想访问哪台主机主要用于指定被请求资源的Internet主机和端口号通常从URL中提取出来
If-Modified-Since: 浏览器告诉服务器缓存数据的时间
Referer:发出请求的 页面的URI  防盗链
Connection:浏览器告诉服务器请求完后是断开链接还是何持链接 心跳包
User-Agent:浏览器的用户代理字符串告诉HTTP服务器, 客户端使用的操作系统和浏览器的名称和版本
举例:
authority: mp.csdn.net
method: GET
path: /postlist/list/audit
scheme: https
accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng;q=0.8,application/signed-exchange;v=b3
accept-encoding: gzip, deflate, br
accept-language: zh-CN,zh;q=0.9
cache-control: max-age=0
cookie: SESSION=25c65; UserName=38795430; UserInfo=0f8; UserToken=0f8; 
referer: https://mp.csdn.net/postlist
upgrade-insecure-requests: 1
user-agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36

Response header Response Header:

Location:服务器告诉浏览器跳到哪里
Server:服务器告诉浏览器服务器的型号
Content-Encoding:服务器告诉数据的压缩格式
Content-Length: 服务器告诉浏览器回送数据的长度
Content-Language: 服务器告诉浏览器语言环境
Content-Type:服务器告诉浏览器回送数据的类型
Refresh:服务器告诉浏览器定时刷新
Content-Disposition: 服务器告诉浏览器以下载方式打数据
Transfer-Encoding:服务器告诉浏览器数据是以分块方式回送的
Expires: -1  服务器告诉控制浏览器不要缓存
Cache-Control: no-cache  
Pragma: no-cache   
举例:
allow: GET, POST, PUT, DELETE, HEAD
content-encoding: gzip
content-type: text/html; charset=UTF-8
date: Sat, 07 Sep 2019 15:46:28 GMT
server: openresty
status: 200
vary: Accept-Encoding

 

Published 35 original articles · won praise 16 · views 190 000 +

Guess you like

Origin blog.csdn.net/qq_38795430/article/details/97576139