http-header Field

Source: Internet
Author: User
Tags local time mime file ranges

header Field

Each header field consists of a domain name, a colon (:), and a domain value of three parts. Domain names are case-insensitive, you can add any number of whitespace before the domain value, and the header field can be expanded to multiple lines, at the beginning of each line, with at least one space or tab.

HTTP request message

HTTP Status Response information

Host Header Field

The host header domain specifies the intenet host and port number of the requesting resource, and must represent the location of the originating server or gateway that requested the URL. The http/1.1 request must contain the host header domain or the system will return with a 400 status code. such as host:image.baidu.com\r\n

Referer header Field

The Referer header domain allows the client to specify the source resource address of the request URI, which allows the server to generate a fallback list that can be used to log in, optimize the cache, and so on. He also allows the abolition or wrong connection to be traced for maintenance purposes. If the requested URI does not have its own URI address, Referer cannot be sent. If you specify a partial URI address, this address should be a relative address.

such as: referer:http://image.baidu.com/\r\n

User-agent header Field

The contents of the User-agent header domain contain the user information that made the request.

such as: user-agent:mozilla/4.0 (compatible; MSIE 6.0 Windows7; SV1;. NET CLR 2.0.50727) \ r \ n

Cache-control header Field

CACHE-CONTROL Specifies the caching mechanism that requests and responses follow. Setting Cache-control in a request message or response message does not modify the caching process in another message processing process. The cache directives for the request include No-cache, No-store, Max-age, Max-stale, Min-fresh, only-if-cached, and the instructions in the response message include public, private, No-cache, No-store, No-transform, Must-revalidate, Proxy-revalidate, Max-age.

such as: cache-control:max-age=0\r\n

Date Header Field

The Date header field represents the time the message was sent, and the time description format was defined by RFC822. For example, Date:mon,31dec200104:25:57gmt. The time described by date represents the world standard, which translates into local time and needs to know the time zone in which the user is located.

Other common header fields:

Accept: Refers to the MIME file format in which the browser or other customer can receive the love. The servlet can judge and return the appropriate file format based on it.

Accept-langeuage: Indicates the type of language that the browser can accept, such as en or en-us, referring to English.

Accept-charset: Indicates the character encoding that the browser can accept. The default value for the English browser is iso-8859-1.

Accept-encoding: Indicates how the browser can accept the encoding. Encoding differs from file format in order to compress files and speed up file delivery. The browser decodes the Web response after it receives it, and then checks the file format.

Connection: Used to tell the server whether a fixed HTTP connection can be maintained. HTTP is not connected, http/1.1 uses keep-alive as the default, so that when a browser needs multiple files (such as an HTML file and related graphics files), it does not need to establish a connection every time.

The Range Header field Range header field can request one or more child ranges of an entity, for example,
Represents the first 500 bytes: bytes=0-499
Represents a second 500 byte: bytes=500-999
Represents the last 500 bytes: bytes=-500
Represents the range after 500 bytes: bytes=500-
First and last byte: Bytes=0-0,-1
Specify several ranges at the same time: bytes=500-600,601-999

Other header fields are not listed.

Copyright ownership belongs to the science and technology Hangzhou FPGA Division , please specify the source of the reprint

Hangzhou Qing-ALIFPGA technology

The original address: Hangzhou Qing-ke technology FPGA space public number

     

scan QR code to pay attention to the science and technology of Hangzhou, FPGA geek space

http-header Field

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.