Reading Notes 2:http protocol

Source: Internet
Author: User

What HTTP is HTTP definition

HTTP (hypertext Transfer Protocol, Hypertext Transfer Protocol) is a communication on the World Wide Web
The protocol scheme that is used.

The status of HTTP

Before you know the status of the HTTP protocol, let's take a quick look at network protocol tiering. HTTP is in the application-layer protocol of the network protocol.

HTTP protocol compositionmessageDefined

An HTTP message is a collection of data interchange standards and text data. Like a parcel in the logistics.

Form start line (Start Row)

Request-url (Request URL): The requested resource, or the full URL of the URL path component.

Method (Request): The action the client wants the server to perform on the requested resource

Status code: This three-digit number describes what happened during the request.

Reson-phrase (reason phrase): Follows the status code, providing an explanation of the state to the person

Version (Version): The HTTP versions used by the message

Header (header)

Accept Header

As the name implies, accept provides the client with the ability to transfer its own preferences and capabilities to the server side. The server returns the corresponding information according to the accept and avoids the server transmitting some unnecessary information.

Accept: Tell the server which media types to send

Accept-charset: Tell the server which character sets to send

Accept-encoding: Tell the server which encoding to send

Accept-language: Tell the server to send those languages

TE: Tell the server which extended transfer encoding can be used

Universal Cache Header

Cache-control: Used with message delivery cache indication

Pragma: Another way to send instructions with a message

General Header

Connetion: Allows client and server-side designations and requests

Body (body)

HTTP communication

Connect
(a) User URL dialing: Enter the page address, click on the hyperlink, click the Submit button
(b) The browser resolves the host name of the server from the URL;
(c) The browser converts the host name of the server to the IP address of the server through DNS;
(d) The browser parses the port number (if any) from the URL;

(e) The browser initiates a connection to this IP address port 80

(f) Server monitoring port listens for client computer requests, establishes handshake
Request

The client establishes a TCP pipeline browser to send an HTTP GET message to the server

Response
The browser reads HTTP response messages from the server
Close
Browser Close Connection

Recognize client and server side

Reading Notes 2: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.