Common HTTP headers

Source: Internet
Author: User
Tags ranges

An agreement is the specification that the interaction parties negotiate to comply with. For example, it is like the same language that the two parties agree to use. If I speak English, you speak Chinese, and everyone can't understand each other and communicate with each other, you will have to be stunned.

HTTP protocol is a language that clients (usually browsers) that need to interact with HTTP servers to negotiate with each other. The HTTP protocol is text-based. Therefore, we can use Telnet to connect to the HTTP server without using a browser or other HTTP clients, and then send a text based on the HTTP request specification, the server can still understand what we want.

The HTTP request message and Response Message are composed of three parts: the start line, the first line, and the entity body. In this article, we are familiar with some common headers in the first line.

HTTP headers can be divided into the following four types:
-Entity:Entity body or resource metadata
-General:Applicable request and reponse Information
-Request:Requests sent from browsers or other clients to servers
-Response:Server Response to requests

Common applicable request headers:
-Accept:Internet media type accepted
-Accept-charset:Character encoding accepted
-Accept-encoding:Specify the format conversion accepted, such as compression
-Accept-language:Specify accepted natural language
-Authorization:Verification Information Required for the requested resource
-Secondary CT:Indicates the special action performed by the server requested by the client.
-From:Email of the requester
-Host:Internet host and port number of the specified resource
-If-match, if-None-match:Cache Mechanism (Client Cache) that works with Entity tags)
-If-modified-since, if-unmodified-since:Cache Mechanism with specified time
-Proxy-authorization:Provide proxy with identity
-Referer:Obtain the URL of the request URI.
-User-Agent:User Agent or client information that generates the request

Common Response Headers:
-Accept-ranges:The type range of the resource cut received by the server, such as accept-ranges: bytes
-Age:Time when the original server response was generated
-Etag:Entity tag similar to the Object ID generated by the requested resource (variant) based on the cache object
-Location:Destination of resource redirection
-Proxy-Authenticate:Indicates that you need to verify the information to obtain the resource.
-Retry-after:Indicates the time when the service was unavailable.
-Server:Software information used by the server to process requests

Common applicable response and request headers:
-Cache-control:Specify the commands that must be followed by all caching mechanisms on the Request/response chain
-Connection:Indicates the action required for a specific connection. After the action is set, the proxy can prevent the connection from being used for interaction again.
-Date:Information generation time
-Pragma:Instructions to be followed in principle in the request/response chain
-Upgrade:Protocol used by the client. If the server supports this protocol, the conversion has this Protocol interaction.
-Warning:Additional information not reflected in normal information

Common headers for entity:
-Allow:Allowed operations on resources, such as allow: Get, head, put
-Content-encoding:Indicates additional data conversion for entity, such as compression
-Content-language:Languages applicable to entity
-Content-Length:Entity-Body Size
-Content-location:If the entity content comes from another Uri, specify the location of the URI
-Content-Type:Specifies the Internet media type, which often includes the character encoding type.
-Content-range:Resource cutting location
-Expires:Indicates the response expiration time.
-Last-modified:Last modification time

Reference link:
-[Quick reference to HTTP headers] (http://www.cs.tut.fi /~ Jkorpela/http.html)

Common HTTP headers

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.