HTTP Common Status Codes

Source: Internet
Author: User
Tags error status code http authentication

The communication between computers is based on the agreement, and both the client and the server communicate according to the agreement. The HTTP status code specifies a number of States within the HTTP protocol. After the client requests the server, the server returns the result, and the status code is returned. Tells the client whether the request was successful or failed, or what the client was doing. The HTTP protocol states that a status code represents a state.

1XX

Information status code indicating that the information is being processed

2XX

Success status code, indicating that the request is processed properly

3XX

Redirection status code, indicating that additional operations (such as jumps) are required for the client

4XX

Client error status code, which is usually caused by errors on the clients

5XX

Server Error status code, which is usually caused by errors on the service side

Summary: Status code is divided into client error status code, server error status code, success status code, redirect status code and so on.

The following are common status codes:

1, 2XX Success

(1) OK

Indicates that the request sent by the client has been successfully received by the server and processed correctly.

Results are returned based on different request methods:

GET: The corresponding resource of the request is returned as appropriate.

Head: The response header of the requested corresponding resource is returned as a response, not including the response body

POST: Returns the result of processing the corresponding request.

(2) 204 No Content

Indicates that the server received the request has been processed, but the server does not need to return the response body,

If the client is a browser, the request returned 204 response, then the browser display page will not be updated.

(3) 206 Partial Content

Indicates that a client fetches part of a resource's data by sending a range request header range.

When an HTTP request is canceled or interrupted, the client may not get the complete data (data transfer interruption). Therefore, as a client, after acquiring some data, it is more desirable to get the remaining data in subsequent requests instead of getting all the data at once, which is also beneficial to devices with insufficient storage space.

2, 3XX redirection

(1) 301 Moved Permanently

Permanent redirection. Indicates that the requested page resource is now permanently transferred to the location. When the server returns a response to a GET request or head request, the requestor is automatically forwarded to the new location.

(2) 302 Found

Temporary redirection. Indicates that the requested page resource has been transferred to a location. Similar to 301, but the difference is that 302 represents a resource that is not permanently moved but is temporary in nature. It is possible that it will change in the future.

(3) 303 See other

Represents another URI for the requested resource, which should be directed to obtain the requested resource using the GRT method. Unlike 302, 302 does not change the request method if the request method is post. Then the redirected request should also be post. For 303, using a POST request, the redirected request method becomes get.

(4) 304 not Modified

Indicates that the resource has been found, but is not updated compared to the last time. The browser reads the cache.

(5) 307 Temporary Redirect

Temporary redirection. There is a similar meaning to 302, 303, but 307 does not specify what request method the client will use to redirect the request. (302 Specifies the use reason request method, 303 specifies that the Get method is used)

4.4XX Client Error

(1) Request

Indicates that there is a syntax error in the request message, which causes the service side to be unable to understand the request. The client needs to modify the requested content and send the request again.

(2) 401 Unauthorized

Indicates that the request sent requires authentication information via HTTP authentication (Basic authentication, Digest authentication).

(3) 403 Forbidden

Indicates that access to the requested resource was rejected by the server. In order to gain access to the file system, there is a problem with access rights, and an attempt to access an unauthorized sending source IP address can result in a 403 response.

(4) Not Found

Indicates that the specified resource could not be found on the server. Typically used for services that do not want to disclose the reason for a denial of request, or that no other response is available.

5.5XX Server Error

(1) Internet Server Error

Indicates that the service side encountered an error while executing the request.

(2) 503 Service unavailable

The request cannot be processed now because the server is temporarily overloaded or is being serviced for downtime.

HTTP Common Status Codes

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.