Java Reference
In-Depth Information
Code and message
Meaning
HttpURLConnection constant
422 Unprocessable
Entity
The content type of the request body is recognized, and the body is
syntactically correct, but nonetheless the server can't process it.
N/A
424 Failed Dependency
Request failed as a result of the failure of a previous request.
N/A
426 Upgrade Required
Client is using a too old or insecure a version of the HTTP protocol.
N/A
428 Precondition
Required
Request must supply an If-Match header.
N/A
429 Too Many Requests
The client is being rate limited and should slow down.
N/A
431 Request Header
Fields Too Large
Either the header as a whole is too large, or one particular header
field is too large.
N/A
451 Unavailable For
Legal Reasons
Experimental; the server is prohibited by law from servicing the
request.
N/A
5XX
Server error.
500 Internal Server
Error
An unexpected condition occurred that the server does not know how
to handle.
HTTP_SERVER_ERROR
HTTP_INTERNAL_ERROR
501 Not Implemented
The server does not have a feature that is needed to fulfill this request.
A server that cannot handle PUT requests might send this response
to a client that tried to PUT form data to it.
HTTP_NOT_IMPLEMENTED
502 Bad Gateway
This code is applicable only to servers that act as proxies or gateways.
It indicates that the proxy received an invalid response from a server
it was connecting to in an effort to fulfill the request.
HTTP_BAD_GATEWAY
503 Service
Unavailable
The server is temporarily unable to handle the request, perhaps due
to overloading or maintenance.
HTTP_UNAVAILABLE
504 Gateway Timeout
The proxy server did not receive a response from the upstream server
within a reasonable amount of time, so it can't send the desired
response to the client.
HTTP_GATEWAY_TIMEOUT
505 HTTP Version Not
Supported
The server does not support the version of HTTP the client is using
(e.g., the as-yet-nonexistent HTTP 2.0).
HTTP_VERSION
507 Insufficient
Storage
Server does not have enough space to store the supplied request
entity; typically used for POST or PUT .
511 Network
Authentication
Required
The client needs to authenticate to gain network access (e.g., on a
hotel wireless network).
N/A
Regardless of version, a response code from 100 to 199 always indicates an informational
response, 200 to 299 always indicates success, 300 to 399 always indicates redirection,
400 to 499 always indicates a client error, and 500 to 599 indicates a server error.
Keep-Alive
HTTP 1.0 opens a new connection for each request. In practice, the time taken to open
and close all the connections in a typical web session can outweigh the time taken to
transmit the data, especially for sessions with many small documents. This is even more
 
Search WWH ::




Custom Search