Initial knowledge of HTTP protocol

Source: Internet
Author: User

Find out more about HTTP protocol-related content. ARP protocolIP can resolve the MAC address through the ARP protocol. -----------------------------------------------------------------------Communication ProcessHTTP protocol generates HTTP request messages for the target Web serverreceive post-processing messages TCP protocol splits HTTP message requests into message segments by ordinal after receiving the message segment reorganizationIP Protocol Search the address of the other side, while transferring-----------------------------------------------------------------------DNS resolution, Application layer protocol, resolving domain names to IP addressesURI Uniform Resource Identifier and URL Uniform Resource LocatorURL is a subset of URIsURI includesftp:/// httpldap://Tel:telnet://News:urn: etc-------------------------------------------------------------the composition of the request message:method URI protocol version POST /form/entry http/1.1 Request HeaderRequest Body-------------------------------------------------------------Response message Composition reason phrase for Protocol version status Code status codehttp/1.1 OK Response HeaderResponse Body-------------------------------------------------------------HTTP is a stateless protocol, so in order to save the state, there is a cookie. methods in http:The Get method is used to request access to a resource that has been identified by the URI. request get/index.html http/1.1 Host:www.xxx.jtp responding to page resources that return index.html request get/index.html http/1.1 Host:www.xxx.jtp if-modified-since:thu,12 Jul 07:30:00 GMT The response only accesses resources that have been updated since that time. If there is no content update, the status Code 304 not modified as the response content. -------------------------------------------------------------POST: Transport entity Bodyrequest post/submit.cgi http/1.1 Host:www.xxx.jtp content-length:1560 response returns the processing result of submit.cgi received data-------------------------------------------------------------PUT: Transferring Filesrequest PUT /example.html http/1.1 Host:www.hackr.jp content-type:text/html content-length:1560 Response Response return status Code 204 no content (Request execution succeeded, but nothing returned) -------------------------------------------------------------Delete deleting filesoptions How to ask for support request options*http/1.1 Host:www.xxx.jp response http/1.1 OK aallow:get,post,head,options (back to supported methods) -------------------------------------------------------------Persistent Connection concept: Before http1.0, each request for a resource to connect and then disconnect TCP, consume resources http/1.1 and some 1,0 have a persistent connection function, so long as any segment is not explicitly proposed to disconnect, then maintain the TCP connection state. MIME concept: Allow messages to handle text, image video and many different types of data transfer. Multi-Part object collection of multiple data. when using a multipart object collection in an HTTP message, you need to add Content-type to the header field. Content Negotiation:example is a page divided into English version of the Chinese version, according to the browser's default language access to the corresponding content. Such a mechanism is called content negotiation. content Negotiation determines the response resource based on language, character set, and encoding. -------------------------------------------------------------Status CodeThe status code tells the result of the request returned from the server side. 1xx Informational An informational status code accepted request is being processed2xx Success Successful status code request normal processing completed 3xx redirection redirect Status Code requires additional action to complete the request 4xx Client Error The state code Server failed to process the request 5xx Server error Server errors service Bad status code servers processing request Errors specifically for example:200 ok     204 No content server received a request that was successfully processed, but does not contain a physical part in the corresponding message returned.        It is also not allowed to return the body of any entity. For example, the page does not update and does not change after submission. 206 partial content indicates that the client made a request for a scope, and the server successfully performed this part of the GET request, and the response message contained the entity content specified by Content-range. 301 Moved Permanently Permanent redirection, the status code indicates that the requested resource has been assigned a new URL. If you save the bookmark, you need to update the bookmark. 302 Found Temporary redirection, the status code indicates that the requested resource has been assigned a new URI and that the user can use the lights out URI access. 303 See other The status code indicates that the requested resource should be directed to the request by using the Get method because another URI exists for the resource that corresponds to the request. 304 Not Modified indicates that when a client sends a request with a condition, the server side allows the request to access the resource, but because the request is satisfied with the condition, it is directly 304, does not contain any body parts of the response, and does not have a relationship with redirection. 307 temporary Redirect Temporary redirection, the status code has the same meaning as 302. There is a syntax error in the request message for a bad request. Requests sent by 401 unauthorized require authentication information that is authenticated by HTTP. 403 Forbidden access to the requested resource was rejected by the server. 404 Not Found Indicates that an error occurred while requesting resource 500 server-side execution request was not found. The 503 Service unavailable server is temporarily overloaded or is undergoing downtime maintenance and cannot process requests.-------------------------------------------------------------

Initial knowledge of HTTP protocol

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.