HTTP status Code

Source: Internet
Author: User

The first line in the Response message is called the status line, which consists of the HTTP protocol version number, the status code, and the status message.

The status code is used to tell the HTTP client whether the HTTP server produced the expected response.

The 5 class status codes are defined in the http/1.1, and the status codes are made up of three digits, and the first number defines the category of the response

1XX hint Message-Indicates that the request was successfully received and continues processing

2XX Success-Indicates that the request has been successfully received, understood, accepted

3XX Redirect-further processing is required to complete the request

4XX Client Error-Request syntax error or request not implemented

5XX server-side error-the server failed to implement a legitimate request

Take a look at some common status codes

OK

The most common is the successful response status Code 200, which indicates that the request was successfully completed and the requested resource was sent back to the client

For example, open the blog Garden Home

302 Found

Redirect, the new URL will be returned in the location in response, and the browser will automatically send a new request using the new URL

For example, enter in IE, http://www.google.com. The HTTP server returns 302, IE takes the new URL to the location header in response and sends a request again.

304 Not Modified

On behalf of the last document has been cached, you can continue to use,

For example, open the blog home page, found a lot of response status code is 304

Tip: If you don't want to use a local cache, you can force the page to refresh with Ctrl+f5

Error request client requests and syntax errors cannot be understood by the server

403 Forbidden server receives request, but refuses to provide service

404 Not Found

The request resource does not exist (the wrong URL was lost)

For example, enter an incorrect URL in IE, http://www.cnblogs.com/tesdf.aspx

An unexpected error occurred on the Internal server error server

503 Server Unavailable Server is currently unable to process client requests and may return to normal after some time

HTTP status Code

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.