HTTP protocol learning and http protocol Learning

Source: Internet
Author: User

HTTP protocol learning and http protocol Learning

1. HTTP Overview

HTTP is actually a set of language communication rules! Http uses a reliable data transmission protocol. Therefore, even if the data comes from the other end of the earth, it can ensure that the data is not damaged or messy during transmission.

B/SStructure

In the browser, the user requests the specific file address of the server, which is called the request protocol. Then the server responds to the corresponding information returned by the user request and becomes the response protocol.

Request protocol:

Composition

1. Request the first line

1.1 Request Method 1.2 request address 1.3 request protocol

2. Request Header

HOST

Whether the connection is retained

Content-length Request body length

Cache-control cache Mechanism

The accept return format description tells the server that the returned data packet format is attached: */* indicates all types

User-agent local environment information system version

Content-type body type attachment: Form display application/x-Www-Form-Urlencoded

Referer Source Address

Data returned by accept-encoding supports encoding and compression.

Languages supported by the data returned by accpet-language

Response Protocol:

Composition

1. Response to the first line

1.1 response protocol 1.2 response status code attachment: 200 indicates normal access/successful 404 indicates that the resource is not found 500 indicates internal server error 302 indicates redirection jump

2. Response Header

Server

Type returned by content-type

Length returned by content-length

The date format server generally returns the Greenwell time, which is located in the GMT + 8 hours. Therefore, the returned Time + 8 hours is the current time.

Appendix: The meta of an HTML webpage is mainly used to submit the request information for the server protocol.

Related Article

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.