HTML status messages
HTML error messages
When the browser requests services from the Web server, errors may occur, and the server may return error codes, such as "404 Not Found".
These errors are usually called HTML error messages.
However, these messages should be called HTTP status messages. In fact, the server always returns a message for each request. The most common message is 200 OK.
The following is a list of possible HTTP status messages that may be returned:
1xx: Information
Message: |
Description: |
100 Continue |
The server received only a partial request, but once the server has not rejected the request, the client should continue to send the remaining part of the request. |
101 Switching Protocols |
Server protocol conversion: The server will comply with the customer's request to switch to another protocol. |
2xx: Success
Message: |
Description: |
200 OK |
The request was successful (followed by the response document for GET and POST requests). |
201 Created |
The request has been created and completed, and a new resource has been created. |
202 Accepted |
The request to be processed has been accepted, but the processing has not been completed. |
203 Non-authoritative Information |
The document has been returned normally, but some response headers may be incorrect because a copy of the document is used. |
204 No Content |
No new document. The browser should continue to display the original document. If the user refreshes the page regularly and the Servlet can determine that the user's document is sufficiently new, this status code is very useful. |
205 Reset Content |
No new document. But the browser should reset the content it displays. It is used to force the browser to clear the form input content. |
206 Partial Content |
The client sent a GET request with a Range header, and the server completed it. |
3xx: Redirection
Message: |
Description: |
300 Multiple Choices |
Multiple choices. Link list. Users can choose a link to reach the destination. Up to five addresses are allowed. |
301 Moved Permanently |
The requested page has been redirected to a new URL. |
302 Found |
The requested page has been temporarily redirected 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 buffered document and has issued a conditional request (usually providing an If-Modified-Since header indicating that the client only wants documents updated after a specified date). The server informs the client that the previously buffered 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 Unused |
This code was used in the previous version. It is no longer in use, but the code is still retained. |
307 Temporary Redirect |
The requested page has been temporarily moved to a new URL. |
4xx: Client Error
Message: |
Description: |
400 Bad Request |
The server was unable to understand the request. |
401 Unauthorized |
The requested page requires a username and password. |
402 Payment Required |
This code is not yet available for use. |
403 Forbidden |
Access to the requested page is prohibited. |
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 using a proxy server, so that the request will be processed. |
408 Request Timeout |
The request exceeds the server's waiting time. |
409 Conflict |
The request cannot be completed due to a conflict. |
410 Gone |
The requested page is not available. |
411 Length Required |
"Content-Length" is not defined. If this content is not present, the server will not accept the request. |
412 Precondition Failed |
The preconditions in the request are evaluated by the server as failed. |
413 Request Entity Too Large |
The server will not accept the request due to the size of the requested entity being too large. |
414 Request-url Too Long |
The server will not accept the request due to the long URL. This situation occurs when a POST request is converted to a GET request with a very long query string. |
415 Unsupported Media Type |
The server will not accept the request due to an unsupported media type. |
416 |
The server cannot satisfy the client's request for the Range header specified in the request. |
417 Expectation Failed |
|
5xx: Server Error
Message: |
Description: |
500 Internal Server Error |
The request was not completed. The server encountered an unforeseeable situation. |
501 Not Implemented |
The request was not completed. The server does not support the requested functionality. |
502 Bad Gateway |
The request was not completed. The server received an invalid response from the upstream server. |
503 Service Unavailable |
The request was not completed. The server is temporarily overloaded or down. |
504 Gateway Timeout |
Gateway Timeout. |
505 HTTP Version Not Supported |
The server does not support the HTTP protocol version specified in the request. |