About HTTP protocol, ASP (2)--Reprint

Source: Internet
Author: User
Tags response code

Original link: Http://www.cnblogs.com/mcad/HTTP working principle diagram

Request message

1. What does the request message look like?

Request message from Chrome core

2. Message structure

3. Meaning of each field in the header of a message

Something copied from the developer tool

get/index.php http/1.1

Host:www.baidu.com

Connection:keep-alive

Cache-control:no-cache

accept:text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8

Pragma:no-cache

user-agent:mozilla/5.0 (Windows NT 6.3; WOW64) applewebkit/537.36 (khtml, like Gecko) maxthon/4.4.3.4000 chrome/30.0.1599.101 safari/537.36

Accept-encoding:gzip,deflate

Accept-language:zh-cn

Cookie:bduss=i4nxzwwtz

Response message

1. What does the response message look like?

Chrome core Browser Response message.

2. Message structure

3. Meaning of each field in the header of a message

4. Response code

1) Common Response Code table.

2 0 0

2 0 1

2 0 2

2 0 4

O K, successful request

o K, new resource establishment (P o s t command )

The request is accepted, but the processing is not completed

O K, but no content returned

3 0 1

3 0 2

3 0 4

The requested resource has been designated as a new fixed U R L

The requested resource is temporarily located in an additional U R L

Document not modified (condition G E T)

4 0 0

4 0 1

4 0 3

4 0 4

Bad Request

is not authorized; The request requires user authentication

Prohibition of unexplained reasons

Not found

5 0 0

5 0 1

5 0 2

5 0 3

Internal server Error

Not implemented

Bad gateway; Invalid response from gateway or upstream server

Service Temporarily expired

2) Regularity Summary

HTTP Response Message Response code, looks a lot of miscellaneous, difficult to remember. In fact, just remember a rule is good.

The Response Code 2XX series indicates success.

Response Code 3XX series indicates redirection

Response Code 4XX series indicates browser-side error request

The response Code 5XX series represents a server-side error.

Finish your speech.

Read this article, in fact, it is not an article. I just sort of labeled the data.

A lot of things, actually do not need to remember all. The brain has a concept, know that the HTTP transmission is text, he is the request/response type.

Remember a few common HTTP headers, Response message status code, will be all right.

About HTTP protocol, ASP (2)--Reprint

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.