HTTP request and Response 4: header (header)

Source: Internet
Author: User

The header and method work together to determine what the client and server can do, and the first part of the HTTP can be in the following categories:
1) General header;
2) Request header;
3) response header;
4) Entity header;

5) Extension header.

General Header
The generic header provides the most basic information related to the message and can be used for both request and response messages. The general header is also classified as an informational header and a cache header.
Informational Header
Header: Connection
Description: Allows the client and server to specify options related to the request/response connection


Header: Date
Description: Provides a date and time flag that describes when the message was created, and lists the date format that is acceptable for the time header


Header: Mime-version
Description: Gives the MIME version used by the sending side


Header: Trailer
Description: If the message uses a chunked transfer encoding (chunked transfer encoding), you can use this header to list the header set in the message trailer (trailer) section.


Header: transfer-encoding
Description: Tells the receiver what coding method is used to ensure the reliable transmission of the message


Header: Update
Description: Gives the new version or protocol that the sending side might want to "upgrade"


Header: Via
Description: Shows the intermediary node (proxy, Gateway) of the message passing through
Cache Header
The HTTP1.1 version has a very rich set of cache parameters, and the following is the basic cache header.


Header: Cache-control
Description: For use with message delivery cache indication


Header: Pragma
Description: Another way of sending instructions with a message, but not dedicated to caching
Request Header
The request header only has meaning in the request message.
Informational Header
Header: Client-ip
Description: Provides the IP address of the machine running the client


Header: From
Description: Provides the e-mail address of the client user


Header: Host
Description: Gives the host name and port number of the server receiving the request


Header: Referer
Description: Provides the URL of the document containing the current request URI


Header: Ua-color
Description: Provides information about the display color of the client display


Header: Ua-cpu
Description: Gives the type of client CPU or manufacturer


Header: Ua-disp
Description: Provides information about the capabilities of the client display (screen)


Header: Ua-os
Description: Gives the name and version of the operating system running on the client machine


Header: Ua-pixels
Description: Provides pixel information for the client display


Header: User-agent
Description: Notifies the server of the application name that originated the request
Accept Header
Header: Accept
Description: Tells the server which media types to send


Header: Accept-charset
Description: Tells the server which character sets to send


Header: accept-encoding
Description: Tells the server which encoding to send


Header: Accept-language
Description: Tell the server which languages to send


Header: TE
Description: Tells the server which extended transfer encoding can be used
Conditional Request Header
Header: Expect
Description: Allows the client to list the server behavior required by a request


Header: If-match
Description: Gets this document if the entity tag matches the current entity tag of the document


Header: If-modified-since
Description: Restricts the request unless the resource has been modified after a specified date


Header: If-none-match
Description: Gets the document if the provided entity tag does not match the entity tag of the current document


Header: If-range
Description: Allows conditional requests to a range of documents


Header: If-unmodified-since
Description: Restricts the request unless the resource has not been modified after a specified date


Header: Range
Description: Requests a specified range of resources if the server supports scope requests
Security Request Header
Header: Authorization
Description: Contains data that the client provides to the server to authenticate itself


Header: Cookie
Description: The client uses it to send a token to the server ———— it is not a true security header, but it does imply a security feature


Header: Cookie2
Description: The cookie version used to describe the support on the requester side
Proxy request Header
Header: Max-forward
Description: The maximum number of times a request is forwarded to another proxy or gateway on the path to the source-side server ———— used with the trace method


Header: Proxy-authorization
Description: Same as Authorization header, but this header is used when authenticating with the agent


Header: Proxy-connection
Description: Same as connection header, but this header is used when establishing a connection to the agent
Response header
The response header is used in response information to provide the client with some additional information to help the client process the response and to initiate better requests in the future.
Informational Header
Header: Age
Description: Response duration


Header: Public
Description: List of request methods that the server supports for its resources


Header: Retry-after
Description: Retry on this date or time if the resource is not available


Header: Server
Description: The name and version of the server application software


Header: Title
Description: For HTML documents, this is the title given to the source side of the HTML document.


Header: Warning
Description: A more detailed warning message than in the cause phrase
Negotiation Header
Header: Accept-ranges
Description: The types of scopes that the server can accept for this resource


Header: Vary
Description: The server views the list of other headers that may respond to changes
Security Response Header
Header: Proxy-authenticate
Description: A list of challenges from the agent to the client


Header: Set-cookie
Description: Not a true security header, but a security feature implied; You can set a token on the client so that the server identifies the client


Header: Set-cookie2
Description: Similar to Set-cookie, RFC2965 cookie definition


Header: Www-authenticate
Description: A list of challenges to the client from the server
Entity Header
The payload used to describe the HTTP message, which can be used in request and response messages.
Informational Entity Header
Header: Allow
Description: Lists the request methods that can be performed on this entity


Header: Location
Description: Tells the client entity where it is actually located; to direct the receiving end to the (possibly new) location (URL) of the resource
Content Header
Header: Content-base
Description: The underlying URL to use when resolving relative URLs in the body


Header: content-encoding
Description: Arbitrary encoding of the principal execution


Header: Content-language
Description: The most appropriate natural language to use when understanding the subject


Header: Content-length
Description: Length or size of the body


Header: Content-location
Description: The location where the resource is actually located


Header: Content-md5
Description: MD5 checksum of the subject


Header: Content-range
Description: The byte range represented by this entity in the entire resource


Header: Content-type
Description: Object type for this principal
Entity Cache Header
Header: ETag
Description: Entity tags related to this entity


Header: Expires
Description: The entity is no longer valid and gets the date and time of this entity from the original source side again


Header: last-modified
Description: Date and time when this entity was last modified
Extension header
The header is not defined in the specification.

HTTP request and Response 4: header (header)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.