Table 16-2   HTTP ERROR MESSAGES
Status Code Recommended Reason Phrase Description
100 Continue HTTP/1.1 and later. This message is returned to the client to indicate that it is okay to continue sending the request. After the request is completed, the server is still required to return another status message.
101 Switching Protocols HTTP/1.1 and later. This message is used when the server wishes to use a different protocol than the one currently being used. For example, if the client sent a request in HTTP/1.1, the server may return this message if it is necessary to use HTTP/2.0 to fulfill the request.
200 OK The request was completed successfully. The meaning of this message is taken in the context of the request–for example, if it is in response to a GET request, it indicates that the file was returned successfully. If it is in response to a POST request, it indicates the information was received correctly.
201 Created After a client requests that a new file be created on a Web server, the Web server will response with a 201 message after completing the request. If you see the 201 status code, it means resource creation is absolutely complete–the standard dictates that servers return a 202 message if resource creation is still in progress. In addition to the status code, a URI is included to identify the location of the new resource.
202 Accepted A command was successfully issued to the HTTP server but is still being processed.
203 Non-Authoritative Information One of the many valid HTTP responses that will probably never be used, 203 is intended to indicate that the server returned a document that was incomplete.
204 No Content The command was successfully processed, but there is no new information to return. The client should not make any changes to its display or cache based on this type of response.
205 Reset Content The client should clear the content from whatever form it is currently displaying to the user. The 205 message is rarely, if ever, used.
206 Partial Content This message indicates a successful response to a partial GET request, a method clients can use to download only part of a file. For example, if a large download is interrupted, the client may request only the portion of the file that was not completed successfully. The server will respond with the 206 message.
300 Multiple Choices Although it is great in theory, I do not know of any server that uses this feature of the HTTP protocol. If put into use, it would aid end users in choosing between multiple locations that mirror identical content.
301 Moved Permanently This response indicates that the requested resource is located somewhere else. It is also known as an “HTTP Redirect.” The 301 and 302 messages work functionally identically, though their intentions vary. Clients that receive a 301 message should update the links they have stored locally to point to the new location. This response is sent by IIS 4.0 when a particular directory has the A Redirection to a URL option button selected and the A Permanent Redirection for This Resource check box has been checked, as shown in Figure 16-5.
302 Moved Temporarily This response indicates that the requested resource is located somewhere else, and the client should redirect its request to the location specified by the server. This response is sent by IIS 4.0 when a particular directory has the A Redirection to a URL option button selected and the A Permanent Redirection for This Resource check box has not been checked.
303 See Other Similar to 302, 303 is most commonly used to redirect a browser to a Web page after a POST action has been completed. For example, after a user submits a form via a Web browser, the server will return a 303 message, requesting that the browser view a page that displays the results.
304 Not Modified The command issued by the browser was processed correctly, but a header option such as “if-modified-since” was used and the document request was “not-modified-since.” Thus, 304 messages do not need to include a document body, because the browser must have a copy already stored in the cache.
305 Use Proxy Never used. The intention is that the browser should redirect its request to a particular proxy server.
400 Bad Request The command sent by the HTTP client was not formatted correctly or was otherwise not understood.
401 Unauthorized The requested document cannot be returned because the security configuration of the server forbids it. This message is usually associated with a list of potential authentication methods using the WWW-Authenticate header field. For example, if NTFS permissions do not allow the anonymous Web user access to a particular document, IIS will return this error message. Browsers generally prompt the user for a username and password when this message is received, though nothing in the standards require that the client reattempt the request.
402 Payment Required This isn’t actually used. You can guess what the intentions are from the response code description, however.
403 Forbidden As with the 401 response, access has been denied. However, this differs from the 401 response in that it indicates that the client should not attempt to rerequest the URI, even with some form of authentication.
404 Not Found The document the browser requested does not exist. Some Web servers may be configured to return this message instead of a 401 message in circumstances where access to certain files is restricted but the server does not want to give away its internal file structure.
405 Method Not Allowed Theoretically, the browser has attempted to issue an HTTP command and the server doesn’t know how to handle it, so it tells the browser a few commands it can accept. Realistically, Web servers respond to unknown methods in unpredictable ways, and browsers don’t necessarily know how to handle the response anyway. So it is never used.
406 Not Acceptable The browser has included a list of response types that it can accept, and the requested document is not one of those types, so the server does not bother to return it to the client. Instead, the server should return a list of options for the browser–different methods that are available to complete the request.
407 Proxy Authentication Required This is similar in function to 401–it indicates that the client needs to prove its identity before the server can return the requested document. The 407 message goes one step further, however, indicating that the client must authenticate itself with a particular authentication server.
408 Request Time-Out The server did not receive a command from the client before a server-specific timeout period, so the server returns this status code and drops the TCP connection. The reality is that the server (for example, both IIS and Netscape Enterprise Server) normally returns nothing to the client, simply dropping the connection.
409 Conflict Never used. It would be used in a circumstance where a request, such as a PUT statement, could not be fulfilled because someone else had the file open or had modified the file. The engineers who drafted the HTTP standards intended this to be used as part of a complex HTTP version-control mechanism, though it has not yet been implemented.
410 Gone Never used. It seems like a far-fetched idea, but this response would be used if the server recognized the requested URI as being a document that it used to have but which is no longer available. Instead of 410, servers will return a 404 status message.
411 Length Required Never used. This is the server’s way of indicating that the last command issued by the client must include the Content-Length header field.
412 Precondition Failed In general, the client submitted a request that included a conditional header field. The conditional header field conditions evaluated false, so nothing needs to be returned.
413 Request Entity Too Large Never used. It is intended to be used in conjunction with a max-file-transfer-size parameter on the server, ensuring that files over a certain size cannot be returned to clients.
414 Request-URI Too Large Never used. The filename and path (the URI) requested is too long to be interpreted properly by the server.
415 Unsupported Media Type Another response that will never make it into prime time. Supposedly, the format of the file the request specified is not compatible with the document type being requested.
500 Internal Server Error About as useful for diagnosing problems as “General Protection Fault,” “500 Internal Server Error” indicates that something bad just happened at the server, and it is not going to tell you what it was.
501 Not Implemented The browser made a request of the server that it is unable to support, a possible response if a browser is attempting to use vendor-specific HTTP extensions.
502 Bad Gateway This message indicates that a proxy server is having a problem responding.
503 Service Unavailable This indicates that the server is currently too busy to fulfill your request. I have seen this message many times in the past, particularly from IIS-based Web servers. However, I have never seen it actually meaning that the server was too busy–it often appears as a false indicator, a manifestation of some other problem.
504 Gateway Time-Out Your proxy server did not receive a response from the destination server before the time-out expired. The server may be offline or may simply not exist.
505 HTTP Version Not Supported In my testing, I could never induce this response from a Web server, so I suspect it is never implemented. Instead, Web servers process the command as if it were from a version of HTTP they understood. This is really part of the magic of the protocol; both servers and clients do their best to honor a request, regardless of whether it will work or not. If this response code were implemented properly, it would be used when the server could not communicate with the browser’s requested version of HTTP.