HTTP status Code (response code)

Source: Internet
Author: User
Tags response code

The HTTP status Code (response code) is used to indicate whether the HTTP request has completed successfully. The HTTP response type is divided into five categories: message response, successful response, redirect, client error, server-side error.

The following table lists all the HTTP status codes and what they mean:

Status Code reason Phrases representative meaning HTTP version
Message response
100 Continue
Continue to
The client should continue to send the request. This temporary response is used to notify the client that a portion of its request has been received by the server and is still not rejected. The client should continue to send the remainder of the request or, if the request is complete, ignore the response. The server must send a final response to the client after the request has completed. http/1.1 available
101 Switching Protocol
(Switching protocol)
The server has understood the client's request and will notify the client via a upgrade message header that a different protocol is being used to complete the request. After the last empty line of the response is sent, the server switches to those protocols defined in the upgrade message header. : Similar measures should be taken only when switching to a new protocol is more beneficial. For example, switching to a new HTTP version is more advantageous than an older version, or switching to a real-time, synchronized protocol to deliver resources that exploit this type of feature. http/1.1 available
Successful response
200 Ok
Success
The request was successful. The meaning of success varies depending on the method used for the request.
  • GET: The resource has been extracted and passed back to the client as the response body.
  • Head: The entity header has been passed back to the client as a response header
  • POST: After the server processes the data from the client, the appropriate resource is passed back to the client as the response body.
  • TRACE: The server receives the request message as a response body back to the client.
The PUT, DELETE, and OPTIONS methods never return a 200 status code.
http/0.9 available
201 Created
(created)
The request succeeds, and a new resource has been established according to the request, usually this is the response code obtained by the PUT method. http/0.9 available
202 Accepted
(created)
The server has accepted the request but has not yet processed it. As it may be rejected, the request may or may not be executed at the end. In the case of asynchronous operation, there is no more convenient way to send this status code. : The purpose of a response that returns a 202 status code is to allow the server to accept requests from other processes, such as a batch-based operation that executes only once a day, without having the client remain connected to the server until the batch operation is complete. Responses that accept requests for processing and return a 202 status code should include in the returned entity some information indicating the processing of the current state, as well as pointers to processing status monitors or state predictions so that the user can estimate whether the operation has completed. http/0.9 available
203 Non-authoritative Information
(Unauthorized information)

The server has successfully processed the request, but the returned entity header meta-information is not a valid set on the original server, but a copy from a local or a third party, if not the case, using the 200 status code is the most appropriate.

http/0.9 and 1.1
204 No Content
(No content)
The response does not respond to content, only the response header, which may also be useful. The user agent can update the cached information for the corresponding resource based on the new response header. http/0.9 available
205 Reset Content
(Reset content)
Tells the user agent to reset the document view of the window that sent the request. http/1.1 available
206 Partial Content
(Partial content)
Use this status code when the client uses the range header field for file segmentation downloads http/1.1 available
redirect
300 Multiple Choice
(Multiple options)
There are several possible responses to the request, and either the user agent or the user must select one of them. The server does not have any criteria that can be followed to replace the user to choose. Http/1.0 and later
301 Moved Permanently
(Permanent movement)
The status code indicates that the requested URI resource path has changed, and the new URL is found in the response Location : header field. http/0.9 available
60W Found
(Temporary move)
The status code indicates that the requested URI resource path is temporarily changed and may continue to change. Therefore, the client will continue to use the URI at a later time. The new URL is found in the header field of the response Location: . http/0.9 available
303 See other
(See other locations)
The server sends the response to direct the client to use the Get method to access another URI. http/0.9 and 1.1
304 Not Modified
(not modified)
Tells the client that the requested content has not changed from the last access. The client can get the resource directly from the browser cache. http/0.9 available
305 Use Proxy
(Use proxy)
The requested resource must be proxied to access the. This status code is not widely supported for security reasons. http/1.1 available
60S Unused
(Not used)
This status code is no longer used, it was used in an older version of the HTTP 1.1 specification. http/1.1 available
307 Temporary Redirect
(Temporary redirect)

The server sends the response to direct the client to use the same method to access the other URI to obtain the resource that it wants to obtain. The new URL is found in the header field of the response Location: . The same semantics as the 302 status code and two accesses must use the same method (GET POST).

http/1.1 available
308 Permanent Redirect
(Permanent redirect)

The requested resource will be permanently located on a different URI. The new URL is found in the header field of the response Location: . The same semantics as the 301 status code, and the same method (GET POST) must be used for two accesses.

Httpbis
(draft test)

Client Error
400 Bad Request
(Error request)
The server was unable to read correctly due to a request syntax error sent. http/0.9 available
401 Unauthorized
(Not authorized)
Authentication is required to obtain the requested content, similar to a 403 error. The difference is. 401 error, as long as the correct input account password, verification can pass. http/0.9 available
402 Payment Required
(Payment required)
The status code is reserved for future use. This code was originally created to be used for digital payment systems, however, it has not been put into use yet. http/0.9 and 1.1
403 Forbidden
(No access)
The client has no right to access the requested content and the server rejects the request. http/0.9 available
404 Not Found
(Not found)
The server could not find the requested resource. Because of this, the status code is very common on the Internet. http/0.9 available
405 Method not allowed
(This method is not allowed)
The method used by the request is banned by the server, and the RFC2616, GET and HEAD methods cannot be banned. http/1.1 available
50W Not acceptable
(unacceptable)
After the server-driven content negotiation, no appropriate content is found to be passed back to the client. http/1.1 available
407 Proxy Authentication Required
(Requires proxy authentication)

Similar to status code 401, but requires a proxy to authenticate.

http/1.1 available
408 Request Timeout
(Request timed out)
The client does not complete a request in the time that the server is waiting to be sent. This means that the server will sever the connection to the client. In other browsers, this response is more common, such as Chrome and IE9, in order to use the HTTP pre-connect mechanism to speed up browsing. Also note that some servers do not send this kind of response directly to cut off the connection. http/1.1 available
409 Conflict
Conflict
The request is in conflict with the current state of the server. http/1.1 available
410 Gone
(expired)
The requested resource has been deleted. http/1.1 available
411 Length Required
(Requires content length header)
Because the server requires a header field in this request Content-Length , the client is not sent. Therefore, the server rejects the request. http/1.1 available
412 Precondition Failed
(Preprocessing failed)
The server failed to meet the prerequisites set by the client in the request header field when acquiring the resource. http/1.1 available
413 Request Entity Too Large
(Request entity is too long)
The request entity size exceeds the maximum limit set by the server, and the server may close the HTTP link and return the Retry-After header field. http/1.1 available
414 Request-uri Too Long
(Request URL too long)
The client request contains a URI address that is too long to be processed by the server. http/1.1 available
415 Unsupported Media Type
(Media type not supported)
The server does not support the media type requested by the client and therefore rejects the request. http/1.1 available
416 Requested Range not satisfiable
(Request scope is not required)
The header field contained in the request Range cannot be satisfied, usually because Range the number in the range exceeds the size of the requested resource. http/1.1 available
417 Expectation Failed
(Expected result failed)
The expected content specified in the request header  Expect could not be satisfied by the server. http/1.1 available
Server-side Error
500 Internal Server Error
(Internal server error)
The server encountered an unknown problem that could not be resolved. http/0.9 available
501 Implemented
(not implemented)
The server does not support the methods used in the request, such as POST and PUT.只有 GET and is the method that the HEAD server must implement in the RFC2616 specification. http/0.9 available
40S Bad Gateway
(Gateway Error)
The server acts as a gateway and obtains an invalid HTTP response from the upstream server. http/0.9 available
503 Service unavailable
(Service Unavailable)
The server is currently unable to process the request due to temporary server maintenance or overloading. The situation is temporary and will be resumed after a period of time. If the delay time can be estimated, then the response can include a Retry-After: header to indicate the delay time. If this information is not given Retry-After: , Then the client should handle it in a manner that handles 500 responses. At the same time, in this case, a friendly page that interprets the server's problem should be returned, and the cache-related HTTP header information should also be included, because the usual error-hinting page should not be cached by the client. http/0.9 available
504 Gateway Timeout
(Gateway timed out)
The server acts as a gateway and cannot be returned to the client in a timely response from the upstream server. http/1.1 available
505 HTTP Version not supported
(HTTP version not supported)
The server does not support HTTP protocol versions that are used in HTTP requests sent by clients. http/1.1 available

HTTP status Code (response 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.