HTTP requests and responses are commonly represented the head of some contexts, the context is the so-called request came from, or in response to the request and subsequent requests in response to which impact.
Context of the request: User-Agent
Specify the type of client information, the server could then make decisions on resource representation
User-Agent = product *( RWS ( product / comment ))
- product = token [ "/" product-version ]
- RWS = 1*( SP / HTAB)
For example: there is supporting information for Mozilla, the client computer system version, browser rendering engine information, browser version, etc.
- Referer = absolute URI / partial-URI
-
-
- For example: Referer: https://www.cnblogs.com/
-
- Sources page protocol used is a local file "file" or "data" URI
- When the current page request http protocol used, and the source of the page using the https protocol
Statistical analysis commonly used in server-side cache analysis, security chain and other functions
Context of the request: From
- The main person responsible for the Web crawler, crawlers to tell the server how to contact through the mail
- From = mailbox
- For example: From: [email protected]
Context response: Server
- Specify the server software information used to help clients locate problems or statistics
- Server = product *( product / comment )
- product = token [ "/" product-version ]
E.g:
- Server: nginx
- Server: openresty/ 1.13.6.2
Context response: Allow the Accept-Ranges
Allow: tell the client, the client tells the server resource corresponding to the URI method of execution which allows
- Allow = #method
- 例如:Allow: GET,HEAD,PUT
Accept-Ranges: tell the customer resources on the server end whether to allow range requests
- Accept-Ranges = acceptable-ranges
- E.g:
-
- Accept-Ranges:bytes
- Accept-Ranges:none
-