Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTTP Status Messages

HTTP Status Messages


Errors may occur when a browser requests a service from a web server.

The following lists a range of HTTP status messages that may be returned:


1xx: Informational

Message: Description:
100 Continue The server has received only part of the request; if it has not rejected the request, the client should continue sending the rest.
101 Switching Protocols Server switches protocol: the server will switch to another protocol as requested by the client.
103 Checkpoint A recovery request suggestion for use when a PUT or POST request fails.

2xx: Success

Message: Description:
200 OK Request succeeded (this is the standard response for a successful HTTP request).
201 Created Request fulfilled and a new resource was created.
202 Accepted The request was accepted for processing, but processing was not completed.
203 Non-Authoritative Information The request was processed successfully, but some response headers may be incorrect because a copy of another document was used.
204 No Content The request was processed successfully, but no new document was returned. The browser should continue displaying the original document. This status code is useful if the user refreshes the page periodically and the servlet can determine that the user's document is fresh enough.
205 Reset Content The request was processed successfully, but no new document was returned. However, the browser should reset what it displays. This is used to force the browser to clear form input.
206 Partial Content The client sent a GET request with a Range header, and the server fulfilled it.

3xx: Redirection

Message: Description:
300 Multiple Choices Multiple choices. A list of links. The user can choose a link to reach the destination. At most five addresses are allowed.
301 Moved Permanently The requested page has moved to a new URL.
302 Found The requested page has temporarily moved to a new URL.
303 See Other The requested page can be found at another URL.
304 Not Modified The document was not modified as expected. The client has a cached document and made a conditional request (usually providing an If-Modified-Since header to indicate it only wants a document newer than the specified date). The server tells the client that the cached document can still be used.
305 Use Proxy The document requested by the client should be retrieved through the proxy server indicated by the Location header.
306 Switch Proxy No longer used, but the code is still reserved.
307 Temporary Redirect The requested page has temporarily moved to a new URL.
308 Resume Incomplete A recovery request suggestion for use when a PUT or POST request fails.

4xx: Client Error

Message: Description:
400 Bad Request The server could not understand the request due to a syntax error.
401 Unauthorized A valid request, but access to the requested page is forbidden because the page requires authentication and the client did not provide it or authentication failed.
402 Payment Required This code is not currently in use.
403 Forbidden A valid request, but access to the requested page is forbidden.
404 Not Found The server cannot find the requested page.
405 Method Not Allowed The method specified in the request is not allowed.
406 Not Acceptable The response generated by the server cannot be accepted by the client.
407 Proxy Authentication Required The user must first authenticate with a proxy server before the request can be processed.
408 Request Timeout The request timed out waiting for the server.
409 Conflict The request could not be completed due to a conflict.
410 Gone The requested page is unavailable.
411 Length Required "Content-Length" is not defined. Without it, the server will not accept the request.
412 Precondition Failed The preconditions in the request were evaluated as false by the server.
413 Request Entity Too Large The server will not accept the request because the requested entity is too large.
414 Request-URI Too Long The server will not accept the request because the URL is too long. This happens when a POST request is converted into a GET request with very long query information.
415 Unsupported Media Type The server will not accept the request because the media type is not supported.
416 Requested Range Not Satisfiable The client requested part of a document, but the server cannot provide the requested part.
417 Expectation Failed The server cannot satisfy the request headers specified by the client in the request.

5xx: Server Error

Message: Description:
500 Internal Server Error The request was not completed. The server encountered an unexpected condition.
501 Not Implemented The request was not completed. The server does not support the requested function, or it could not complete the request.
502 Bad Gateway The request was not completed. While acting as a gateway or proxy, the server received an invalid response from an upstream server.
503 Service Unavailable The server is currently unavailable (overloaded or down).
504 Gateway Timeout Gateway timeout. While acting as a gateway or proxy, the server did not receive a timely response from an upstream server.
505 HTTP Version Not Supported The server does not support the HTTP protocol version specified in the request.
511 Network Authentication Required The user needs to provide authentication to gain network access.