HTTP Status Codes
1xx (Informational)
This class of status code indicates a provisional response, that is an interim status update for information purposes only. For example a status code of 100 indicates that he client can continue with the request and that no errors have been detected.
2xx (Successful)
This class of status code indicates that the client's request was successfully received, understood, and accepted.
3xx (Redirection)
This class of status code indicates that further action needs to be taken by the user agent in order to fulfill the request.
4xx (Client Error)
The 4xx class of status code is intended for cases in which the client seems to have made an error. For example requesting a page that does not exist - this example is indicated with a 404 error.
5xx (Server Error)
Response status codes beginning with the digit "5" indicate cases in which the server is aware that it has made an error or is incapable of performing the request. For example if the server is overloaded (503 Service Unavailable would be an appropriate status to issue).
1xx Status Codes
Informational
| 100 (Continue) |
The 100 status is an interim response that is used to inform the client that the initial part of the request has been received. The client should continue by sending the remainder of the request. The server must send a final response after the request has been completed. If there is a break in communication or a further status (either succdess or fail) is not received the client should retry the request. This status can be used as a confirmation that the server is available and ready for a full request for a resource.
|
| 101 (Switching Protocols) |
The server will switch protocols, for example from HTTP/1.0 to HTTP/1.1. The request will then be dealt with and a further response sent.
|
2xx Status CodesOK
| 200 (OK) |
The request has succeeded, the requested resource is available and may be displayed. This is the standard response in a successful request.
|
| 201 (Created) |
The client request has resulted in the resource being created, on receipt of a POST of variables that define how the resource is to be created. A 202 status may be issued while creation of the resource takes place.
|
| 202 (Accepted) |
The client request has been accepted, this request may or may not be acted on depending on the specifics of the request, a further status will be issued.
|
| 203 (Non-Authoritative Information) |
This status indicates that the resource is available but not from the original source, in essence this is a "200" status but without certainty of the resource source.
|
| 204 (No Content) |
The request has been successful but there is no additional content that needs to be sent. If the client is a browser for example no changes need to be made to the displayed output. This status is primarily to allow additional information to be sent to the server without interrupting the client view, for example this would allow additional data to be sent to a script. This status show never include a message body - as of course there should not be any content to make up the message body.
|
| 205 (Reset Content) |
The request has been successful and the client view should now be reset. For example, form data has been sent (and received) - the client should now reset (or move on from) the form so that the form is no longer displayed.
|
| 206 (Partial Content) |
The client has a copy of the relevant resource in its cache. However, there is a discrepancy in the "last modified date" and therefore the client has requested additional parts to the resource. Essentially the request made is: "if the resource is unchanged, please send the part (or parts) that I am missing; otherwise, send the entire resource". This status indicated that the request was successful.
|
3xx Status CodesRedirection
| 300 (Multiple Choices) |
Due to duplicate filenames or word sense disambiguation (where the exact meaning cannot be determined) more than one choice of resource is possible. Generally this is dealt with in one of two ways - an assumption is made (for example; lets just take the first resource in order of age), or a choice is provided to the client (please choose).
|
| 301 (Moved Permanently) |
This resource has been moved and it's new location will be its new permanent location, all future requests should be made to the new location.
|
| 302 (Found) |
Previously "Moved Temporarily"; this resource is currently at a different location, however this may change and so this location should be used for the time being until a permanent location is found, and a 301 issued.
|
| 303 (See Other) |
As with 302, the requested resource has moved, the resource can be fetched from the new location using a GET request.
|
| 304 (Not Modified) |
This resource has not changed since the last request from this client, a chached copy should be used.
|
| 305 (Use Proxy) |
The requested resource must be accessed through the proxy given by the location field.
|
| 306 (Switch Proxy) |
The 306 code is no longer in use.
|
| 307 (Temporary Redirect) |
Continue to use this location for theis resource, however at this time you will be redirected.
|
4xx Status CodesClient Error
| 400 (Bad request) |
This request was not understood by the server, probably because it was incorrectly formed. Please do not repeat this request until the error has been corrected.
|
| 401 (Unauthorized) |
The request requires user authentication that has not been supplied.
|
| 402 (Payment Required) |
The intention was that this code was to be used as part of a payment scheme, so far this has not happened and this code is currently not in use.
|
| 403 (Forbidden) |
Access is not allowed to this resource authorization will not help and the request should not be repeated.
|
| 404 (Not Found) |
No resource is know at this location. (410 "Gone" should be used if the resource has been permanently removed).
|
| 405 (Method Not Allowed) |
The type of request you are making is not allowed. Methods include GET, POST and HEAD, however web servers can be configured to disallow any of these (or other methods) the method you are using may have been disallowed on this server. Alternatively you are attempting to use a method that this server simply does not understand.
|
| 406 (Not Acceptable) |
The client has requested a resource, but this resource is in a format that it not allowed by that client.
|
| 407 (Proxy Authentication Required) |
This code is similar to 401 (Unauthorized) but in this instance access must be made via a proxy that in turn requires authentication.
|
| 408 (Request Timeout) |
At some point in communication between the client and the server a timeout has occurred. The connection has been closed and will have to be re-established.
|
| 409 (Conflict) |
There is a conflict between the client request for a resource and that resource (or rule that governs that resource). For example if you are trying to modify a resource that is not allowed to be modified, or if you are uploading a file that is older than the one already there.
|
| 410 (Gone) |
This resource has been removed permanently (or someone is hiding it!).
|
| 411 (Length Required) |
The client did not define the length of the resource. This is often required when a resource is being sent to a server so that the server can determine how to handle the resource based on its file size. This may include rules such as a maximum allowable file size.
|
| 412 (Precondition Failed) |
The request for a resource included a precondition that was not met. For example; provide this resource if it is a video under 100 kilobytes.
|
| 413 (Request Entity Too Large) |
The resource (probably being sent to a server) is too large (in bytes).
|
| 414 (Request-URI Too Long) |
The location URI is too long. Typically servers have large limits on URI's and so it is unlikely that this error is caused simply by the location part of the URL itself. It is more likely that a GET request has added erroneous data to the URI, or perhaps a POST has been converted into a GET.
|
| 415 (Unsupported Media Type) |
Generally this means that a request has been made for a media type that is unsupported by the server, however this may also be caused by a conflict between the request (requesting an image), when in fact the resource is a text document.
|
| 416 (Requested Range Not Satisfiable) |
The client, which sends information on acceptable file size as part of its request, may have requested a file that does not satisfy these parameters.
|
| 417 (Expectation Failed) |
The client can send "Expect headers" that are used to indicate that particular server behaviors are required by the client. The server did not meet these expectations.
|
5xx Status CodesInternal Server Error
| 500 (Internal Server Error) |
The server encountered an unexpected error which prevented it from fulfilling the request.
|
| 501 (Not Implemented) |
The server does not understand or support the method required to fulfill the request.
|
| 502 (Bad Gateway) |
The server, while acting as a proxy (that is the middle server between you and a second server), received an invalid response from the upstream (second) server it accessed in attempting to fulfill the request.
|
| 503 (Service Unavailable) |
The server you are accessing is unavailable, most likely it is rejecting requests due to reaching the maximum number of allowed concurrent connections.
|
| 504 (Gateway Timeout) |
The server, while acting as a proxy, did not receive a timely response from the upstream server and has timed out.
|
| 505 (HTTP Version Not Supported) |
The server does not support the HTTP protocol version that was used in the request message.
|
Comments
Post a Comment