HTTP status Code explanation

Source: Internet
Author: User
Tags error status code

What is an HTTP status code

The HTTP status code is used by the Web server to tell the client what has happened.

The status code, located in the first line of HTTP Response, returns a "three-digit status code" and a "status message." The "three-digit status code" is easy for the program to process, and "status messages" are easier to understand.

Defined range Classification
1XX 100-101 Information Tips
2XX 200-206 Success
3XX 300-305 redirect
4XX 400-415 Client Error
5XX 500-505 Server error

4XX Client Error status code

Status code Status messages Meaning
400 Bad Request Tells the client that it sent an incorrect request.
401 Unauthorized (not authorized) Requires the client to authenticate itself
402 Payment Required (Requires payment) This state has not been used and is reserved for future use
403 Forbidden (Forbidden) The request was rejected by the server
50U Not Found (not found) Resource not Found
405 Method not allowed (methods not allowed) The method of the request is not supported.
50W Not acceptable (unacceptable)
407 Proxy authentication Required (requires agent authentication) Similar to status code 401 for proxy servers that require authentication
408 Request Timeout (requests timed out) If the client takes too long to complete the request, the server can echo the status code and close the connection
409 Conflict (conflict) The request caused some conflict on the resource
410 Gone (disappeared) The server used to have this resource, and now it's gone, similar to status code 404
411 Length Required (requires long indication) The server requires that Content-length be included in the request.
412 Precondition Failed (Prerequisite failure)
413 Request entity Too Large (requesting entities too large) The entity body part sent by the client is larger than the server can or wants to handle
414 Request URI Too Long (requests URI is too lengthy) The client sends a request with a URL that exceeds the length that the server can or wants to process
415 Unsupported media type (not supported) The server does not understand or does not support the content type of the entity sent by the client
416 Requested range not satisfiable (the requested range is not met)
417 Expectation Failed (unable to meet expectations)

5XX Server Error Status code

Status code Status messages Meaning
500 Internal Server error (internal server errors) The server encountered an error that prevented it from serving the request
501 Not implemented (not implemented) This status code is used when a client-initiated request exceeds the capabilities of the server (for example, using a request method that is not supported by the server).
502 Bad Gateway (gateways fail) The server used by the agent encountered an invalid upstream response
503 Service Unavailable (not available) The server is currently unable to service the request, but can recover the service over time
504 Gateway Timeout (gateways timed out) Similar to the status 408, but the response comes from the gateway or proxy, and this gateway or proxy has timed out while waiting for the response from another server
505 HTTP version not supported (HTTP versions not supported) The server received a request that uses an HTTP protocol version that it does not support. Some servers do not support HTTP earlier HTTP protocol versions, nor do they support too high protocol versions

Common Status Codes

Status code Status messages Meaning
200 Ok The server successfully processed the request (this is the most we have seen)
201 Created (created) The resource has been created for requests that require the server to create objects.
202 Accepted (accepted) The request has been accepted, but the server has not yet processed
203 Non-authoritative Information (non-authoritative information) The server has successfully processed the transaction, except that the entity header contains information that is not from the original server but from a copy of the resource.
204 No content (no contents) Response contains headers and a status line, but does not include the subject content of the entity (no response body)
205 Reset content (Reset contents) Another code that is primarily used for browsers. This means that the browser should reset all the HTML forms on the current page.
206 Partial content (partial) Partial request succeeded

3XX REDIRECT Status code

The URL of the
Status code Status messages Meaning Instance
+ multiple Choices (multiple selection)   client requests a URL that actually points to multiple resources. This code is returned with a list of options, and then the user can select the option he wants  
301 Moved permanently (permanently removed) request was moved. The response should contain a location URL that explains where the resource is now located  
302 Found (found) Code 301 is similar. But the removal here is temporary. The client will resend the new HTTP request   using the URL given in location,
303  see Other (see other) similar to 302  
304 not Modified (unmodified) client's cache resource is up-to-date for clients to use the cache  
305  use proxy (using proxy) must access the resource through the proxy, the address of the agent in the Loc of response ation  
306   not used   This status code is not currently used  
307 Temporary Redirect (temporary redirect similar to 302  

2XX Success Status Code

Status code Status messages Meaning Instance
200 Ok The server successfully processed the request (this is the most we have seen)
201 Created (created) The resource has been created for requests that require the server to create objects.
202 Accepted (accepted) The request has been accepted, but the server has not yet processed
203 Non-authoritative Information (non-authoritative information) The server has successfully processed the transaction, except that the entity header contains information that is not from the original server but from a copy of the resource.
204 No content (no contents) Response contains headers and a status line, but does not include the subject content of the entity (no response body)
205 Reset content (Reset contents) Another code that is primarily used for browsers. This means that the browser should reset all the HTML forms on the current page.
206 Partial content (partial) Partial request succeeded

This article transferred from: http://www.cr173.com/html/18901_2.html

HTTP status Code explanation

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.