4xx  -  Client Error
 Extracts from RFC 2068, "Hypertext Transfer Protocol -- HTTP/1.1", R. Fielding, et.al., 1997

The 4xx class of status code is intended for cases in which the client seems to have erred. These status codes are applicable to any request method.

1xx  -  Information
2xx  -  Success
3xx  -  Redirection
400  -  Bad Request
401  -  Unauthorized
402  -  Payment Required
403  -  Forbidden
404  -  Not Found
405  -  Method Not Allowed
406  -  Not Acceptable
407  -  Proxy Authentication Required
408  -  Request Timeout
409  -  Conflict
410  -  Gone
411  -  Length Required
412  -  Precondition Failed
413  -  Request Entity Too Large
414  -  Request URI Too Long
415  -  Unsupported Media Type
416  -  Requested Range Not Satisfiable
417  -  Expectation Failed
5xx  -  Server Error

400  Bad Request

The request could not be understood by the server due to malformed syntax. The client should not repeat the request without modifications.

401  Unauthorized

The request requires user authentication. The response must include a WWW-Authenticate header field containing a challenge applicable to the requested resource. The client may repeat the request with a suitable Authorization header field . If the request already included Authorization credentials, then the 401 response indicates that authorization has been refused for those credentials. If the 401 response contains the same challenge as the prior response, and the user agent has already attempted authentication at least once, then the user should be presented the entity that was given in the response, since that entity may include relevant diagnostic information.

402  Payment Required

This code is reserved for future use.

403  Forbidden

The server understood the request, but is refusing to fulfill it. Authorization will not help and the request should not be repeated. If the request method was not HEAD and the server wishes to make public why the request has not been fulfilled, it should describe the reason for the refusal in the entity body. This status code is commonly used when the server does not wish to reveal exactly why the request has been refused, or when no other response is applicable.

404  Not Found

The server has not found anything matching the Request-URI. No indication is given of whether the condition is temporary or permanent. The 410 (Gone) status code SHOULD be used if the server knows, through some internally configurable mechanism, that an old resource is permanently unavailable and has no forwarding address. This status code is commonly used when the server does not wish to reveal exactly why the request has been refused, or when no other response is applicable.

405  Method Not Allowed

The method specified in the Request-Line is not allowed for the resource identified by the Request-URI. The response MUST include an Allow header containing a list of valid methods for the requested resource.

406  Not Acceptable

The resource identified by the request is only capable of generating response entities which have content characteristics not acceptable according to the accept headers sent in the request.

407  Proxy Authentication Required

This code is similar to 401 (Unauthorized), but indicates that the client MUST first authenticate itself with the proxy.

408  Request Timeout

The client did not produce a request within the time that the server was prepared to wait. The client MAY repeat the request without modifications at any later time.

409  Conflict

The request could not be completed due to a conflict with the current state of the resource. Ideally, the response entity would include enough information for the user or user agent to fix the problem; however, that may not be possible and is not required.

410  Gone

The requested resource is no longer available at the server and no forwarding address is known. This condition is expected to be considered permanent. Clients with link editing capabilities SHOULD delete references to the Request-URI after user approval. If the server does not know, or has no facility to determine, whether or not the condition is permanent, the status code 404 (Not Found) SHOULD be used instead.

411  Length Required

The server refuses to accept the request without a defined Content- Length. The client MAY repeat the request if it adds a valid Content-Length header field containing the length of the message-body in the request message.

412  Precondition Failed

The precondition given in one or more of the request-header fields evaluated to false when it was tested on the server. This response code allows the client to place preconditions on the current resource metainformation (header field data) and thus prevent the requested method from being applied to a resource other than the one intended.

413  Request Entity Too Large

The server is refusing to process a request because the request entity is larger than the server is willing or able to process. The server MAY close the connection to prevent the client from continuing the request.

414  Request-URI Too Long

The server is refusing to service the request because the Request-URI is longer than the server is willing to interpret.

415  Unsupported Media Type

The server is refusing to service the request because the entity of the request is in a format not supported by the requested resource for the requested method.

416  Requested Range Not Satisfiable

A server SHOULD return a response with this status code if a request included a Range request-header field (section 14.35), and none of the range-specifier values in this field overlap the current extent of the selected resource, and the request did not include an If-Range request-header field.

417  Expectation Failed

The expectation given in an Expect request-header field could not be met by this server, or, if the server is a proxy, the server has unambiguous evidence that the request could not be met by the next-hop server.