Friday, May 29, 2009

HTTP Status Codes: 4xx Client Error

The request contains bad syntax or cannot be fulfilled.

The 4xx class of status code is intended for cases in which the client seems to have erred. Except when responding to a HEAD request, the server should include an entity containing an explanation of the error situation, and whether it is a temporary or permanent condition. These status codes are applicable to any request method. User agents should display any included entity to the user. These are typically the most common error codes encountered while online.

400 Bad Request: The request contains bad syntax or cannot be fulfilled.

401 Unauthorized: Similar to 403 Forbidden, but specifically for use when authentication is possible but has failed or not yet been provided. See Basic access authentication and Digest access authentication.

402 Payment Required: The original intention was that this code might be used as part of some form of digital cash or micropayment scheme, but that has not happened, and this code has never been used.

403 Forbidden: The request was a legal request, but the server is refusing to respond to it. Unlike a 401 unauthorized response, authenticating will make no difference.

404 Not Found: The requested resource could not be found but may be available again in the future. Subsequent requests by the client are permissible.

405 Method Not Allowed: A request was made of a resource using a request method not supported by that resource; for example, using GET on a form which requires data to be presented via POST, or using PUT on a read-only resource.

406 Not Acceptable: The requested resource is only capable of generating content not acceptable according to the Accept headers sent in the request.

407 Proxy Authentication Required

408 Request Timeout: The server timed out waiting for the request.

409 Conflict: Indicates that the request could not be processed because of conflict in the request, such as an edit conflict.

410 Gone: Indicates that the resource requested is no longer available and will not be available again. This should be used when a resource has been intentionally removed; however, it is not necessary to return this code and a 404 Not Found can be issued instead. Upon receiving a 410 status code, the client should not request the resource again in the future. Clients such as search engines should remove the resource from their indexes.

411 Length Required: The request did not specify the length of its content, which is required by the requested resource.

412 Precondition Failed: The server does not meet one of the preconditions that the requestor put on the request.

413 Request Entity Too Large: The resource that was requested is too large to transmit using the current protocol.

414 Request-URI Too Long: The URI provided was too long for the server to process.

415 Unsupported Media Type: The request did not specify any media types that the server or resource supports. For example the client specified that an image resource should be served as image/svg+xml, but the server cannot find a matching version of the image.

416 Requested Range Not Satisfiable: The client has asked for a portion of the file, but the server cannot supply that portion (for example, if the client asked for a part of the file that lies beyond the end of the file).

417 Expectation Failed: The server cannot meet the requirements of the Expect request-header field.

422 Unprocessable Entity: The request was well-formed but was unable to be followed due to semantic errors.

423 Locked: The resource that is being accessed is locked

424 Failed Dependency: The request failed due to failure of a previous request

425 Unordered Collection

426 Upgrade Required: The client should switch to TLS/1.0.449 Retry With

No comments: