HTTP Header details

Source: Internet
Author: User
Tags http cookie


HTTP Header details HTTP (HyperTextTransferProtocol) is Hypertext Transfer Protocol. Currently, the General Protocol for webpage transmission. The HTTP protocol uses the request/response model. The browser or other clients send requests and the server responds to the requests. The entire network resource transmission involves message-header and message-body. First pass the message-header, that is, the http header message. Http header messages are generally divided into four parts: general header, request header, response header, and entity header. However, in terms of understanding this method, I feel that the boundary is not clear. According to the content organization of http headers in Wikipedia, the content is divided into two parts: Request and Response. The following is an example of the Requests Header description. Accept specifies the content type that the client can receive. Accept: text/plain, text/htmlAccept-Charset indicates the string set that the browser can Accept. Accept-Charset: iso-8859-5Accept-Encoding specifies the type of content compression encoding that can be returned by web servers supported by the browser. Accept-Encoding: compress, gzipAccept-Language the acceptable Language of the browser Accept-Language: en, zhAccept-Ranges can request one or more sub-range fields of the webpage object Accept-Ranges: bytesAuthorization HTTP Authorization Certificate Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ = www.2cto.com Cache-Control specifies the Cache mechanism for requests and responses-Cache-Control: no-cacheConnection indicates whether persistent connections are required. (HTTP 1.1 performs a persistent Connection by default) Connection: When a closeCookie HTTP request is sent, all cookie values saved under the domain name of the request are sent to the web server. Cookie: $ Version = 1; Skin = new;
Content-Length the Content Length of the Request Content-Length: 348Content-Type Content-Type: application/x-www-form-urlencodedDate the Date and time the request was sent by Date: Tue, 15 Nov 2010 08:12:31 GMTExpect the specific server behavior of the request was wrong CT: 100-continueFrom the user's Email From: user@email.comHost specifies the domain name and port number of the requested server Host: If-Match is valid only when the request content matches the entity. If-Match: "737060cd8c284d8af7ad3082f209582d" If-Modified-Since the request is Modified after the specified time, the request is successful. If not Modified, the system returns the 304 code If-Modified-Since: Sat, 29 Oct 2010 19:43:31 GMT
If-None-Match: If the content is not changed, code 304 is returned. The parameter is the Etag previously sent by the server. Compare it with the Etag responded by the server to determine whether to change If-None-Match: "737060cd8c284d8af7ad3082f209582d" If-Range If the entity is not changed, the server sends the part lost by the client; otherwise, the whole entity is sent. The parameter is also Etag If-Range: "737060cd8c284d8af7ad3082f209582d" If-Unmodified-Since request is successful only when the object is not modified after the specified time. If-Unmodified-Since: Sat, 29 Oct 2010 19:43:31 GMT www.2cto.com Max-Forwards limits the time at which messages are sent through the proxy and gateway Max-Forwards: 10 Pragma to include specific instructions for Pragma: no-cacheProxy-Authorization the Authorization certificate used to connect to the Proxy-Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ = Range is only part of the request object. The specified Range is Range: bytes = 500-999Referer, the current request webpage is followed by a Referer: http:///archives/71.htmlTE The client is willing to accept the transmission code and notifies the server to accept the tail header information TE: trailers, deflate; q = 0.5 Upgrade to specify a certain transmission protocol to the server for conversion (if supported) upgrade: HTTP/2.0, SHTTP/1.3, IRC/6.9, RTA/x11User-Agent User-Agent content contains the User information that sends the request User-Agent: Mozilla/5.0 (Linux; X11) via notifies the intermediate gateway or proxy server address, communication protocol Via: 1.0 fred, 1.1 nowhere.com (Apache/1.1) Warning information about message entity Warn: 199 Miscellaneous warningResponses section www.2cto.com Header interpretation example Accept-Ranges indicates whether the server supports a specified range of requests and what type of score Segment request Accept-Ranges: The estimated time (in seconds, non-negative) That bytesAge forms from the original server to the Proxy Cache Age: 12 Allow valid request behavior for a network resource, if not, the system returns 405 Allow: GET, HEADCache-Control, which indicates whether all Cache mechanisms can be cached and what type of Cache-Control: the Encoding type of the returned content supported by the no-cacheContent-Encoding web server. Content-Encoding: gzipContent-Language response body Language Content-Language: en, zhContent-Length response body Length Content-Length: 348
Content-Location request resource alternative address Content-Location:/index.htm Content-MD5 returns the MD5 checksum Content-MD5 for the resource: q2hlY2sgSW50ZWdyaXR5IQ = Content-Range: bytes 21010-47021/47022 Content-Type the MIME Type Content-Type: text/html; charset = utf-8Date original Server Message issued time Date: Tue, 15 Nov 2010 08:12:31 current value of the GMTETag request variable entity tag ETag: "737060cd8c284d8af7ad3082f209582d" Expires response expiration Date and time Expires: thu, 01 Dec 2010 16:00:00 GMTLast-Modified the Last modification time of the requested resource Last-Modified: Tue, 15 Nov 2010 12:45:26 GMTLocation is used to redirect the recipient to a Location other than the requested URL to complete the request or identify the new resource Location: http:///archives/94.htmlPragma Includes the implementation of specific commands that can be applied to any receiver Pragma on the response chain: no-cacheProxy-Authenticate it specifies the authentication scheme and the parameter Proxy-Authenticate: Basicrefresh applied to the URL of the Proxy or a new resource is created, redirect in 5 seconds (proposed by Netscape and supported by most browsers) www.2cto.com Refresh: 5; url = http:///archives/94.htmlRetry-After If the object is temporarily unavailable, notify the client to try again After the specified time: Retry-After: 120 Server web Server software name Server: Apache/1.3.27 (Unix) (Red-Hat/Linux) set-Cookie setting Http Cookie Set-Cookie: UserID = JohnDoe; Max-Age = 3600; Version = 1 Trailer indicates that the header domain has a Trailer at the end of the multipart Transfer Encoding: max-ForwardsTransfer-Encoding file Transfer code Transfer-Encoding: chunkedVary tells the downstream proxy whether to use cache response or request Vary from the original server: * Via tells the proxy client where to send the response: 1.0 fred, 1.1 nowhere.com (Apache/1.1) Warning warns entities of possible problems Warning: 199 Miscellaneous warningWWW-Authenticate indicates the authorization scheme WWW-Authenticate: Basic that the client request entity should use

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.