Advanced
Java
Services
|
HTTP response codes |
Code | HTTP Version | Bedeutung | Konstante aus HttpURLConnection
1xx
|
| Informational
|
| 100
| HTTP 1.0
|
| n.a.
| 101
| HTTP 1.0
|
| n.a.
| 2xx
|
| Request succeded
|
| 200
| HTTP 1.1
|
| HTTP_OK
| 201
| HTTP 1.1
|
| HTTP_CREATED
| 202
| HTTP 1.0
| The request has been accepted for processing, but the processing
has not been completed. The request may or may not eventually be
acted upon, as it may be disallowed when processing actually takes
place. There is no facility for re-sending a status code from an
asynchronous operation such as this.
The 202 response is intentionally non-committal. Its purpose is to
allow a server to accept a request for some other process (perhaps
a batch-oriented process that is only run once per day) without
requiring that the user agent's connection to the server persist
until the process is completed. The entity returned with this
response should include an indication of the request's current
status and either a pointer to a status monitor or some estimate of
when the user can expect the request to be fulfilled.
| HTTP_ACCEPTED
| 203
| HTTP 1.1
|
| HTTP_NOT_AUTHORITATIVE
| 204
| HTTP 1.0
| The server has fulfilled the request but there is no new
information to send back. If the client is a user agent, it should
not change its document view from that which caused the request to
be generated. This response is primarily intended to allow input
for scripts or other actions to take place without causing a change
to the user agent's active document view. The response may include
new metainformation in the form of entity headers, which should
apply to the document currently in the user agent's active view.
| HTTP_NO_CONTENT
| 205
| HTTP 1.1
|
| HTTP_RESET
| 206
| HTTP 1.1
|
| HTTP_PARTIAL
| 3xx
|
| Relocation and redirection
|
| 300
| HTTP 1.0
| This response code is not directly used by HTTP/1.0 applications,
but serves as the default for interpreting the 3xx class of
responses.
The requested resource is available at one or more locations.
Unless it was a HEAD request, the response should include an entity
containing a list of resource characteristics and locations from
which the user or user agent can choose the one most appropriate.
If the server has a preferred choice, it should include the URL in
a Location field; user agents may use this field value for
automatic redirection.
| HTTP_MULT_CHOICE
| 301
| HTTP 1.0
| The requested resource has been assigned a new permanent URL and
any future references to this resource should be done using that
URL. Clients with link editing capabilities should automatically
relink references to the Request-URI to the new reference returned
by the server, where possible.
The new URL must be given by the Location field in the response.
Unless it was a HEAD request, the Entity-Body of the response
should contain a short note with a hyperlink to the new URL.
If the 301 status code is received in response to a request using
the POST method, the user agent must not automatically redirect the
request unless it can be confirmed by the user, since this might
change the conditions under which the request was issued.
Note: When automatically redirecting a POST request after
receiving a 301 status code, some existing user agents will
erroneously change it into a GET request.
| HTTP_MOVED_PERM
| 302
| HTTP 1.0
| The requested resource resides temporarily under a different URL.
Since the redirection may be altered on occasion, the client should
continue to use the Request-URI for future requests.
The URL must be given by the Location field in the response. Unless
it was a HEAD request, the Entity-Body of the response should
contain a short note with a hyperlink to the new URI(s).
If the 302 status code is received in response to a request using
the POST method, the user agent must not automatically redirect the
request unless it can be confirmed by the user, since this might
change the conditions under which the request was issued.
Note: When automatically redirecting a POST request after
receiving a 302 status code, some existing user agents will
erroneously change it into a GET request.
| HTTP_MOVED_TEMP
| 303
| HTTP 1.1
|
| HTTP_SEE_OTHER
| 304
| HTTP 1.0
| If the client has performed a conditional GET request and access is
allowed, but the document has not been modified since the date and
time specified in the If-Modified-Since field, the server must
respond with this status code and not send an Entity-Body to the
client. Header fields contained in the response should only include
information which is relevant to cache managers or which may have
changed independently of the entity's Last-Modified date. Examples
of relevant header fields include: Date, Server, and Expires. A
cache should update its cached entity to reflect any new field
values given in the 304 response.
| HTTP_NOT_MODIFIED
| 305
| HTTP 1.1
|
| HTTP_USE_PROXY
| 307
| HTTP 1.1
|
| n.a.
| 4xx
|
| Client error
|
| 400
| HTTP 1.0
| The request could not be understood by the server due to malformed
syntax. The client should not repeat the request without
modifications.
| HTTP_BAD_REQUEST
| 401
| HTTP 1.0
| The request requires user authentication. The response must include
a WWW-Authenticate header field (Section 10.16) containing a
challenge applicable to the requested resource. The client may
repeat the request with a suitable Authorization header field
(Section 10.2). 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. HTTP
access authentication is explained in Section 11.
| HTTP_UNAUTHORIZED
| 402
| HTTP 1.1
|
| HTTP_PAYMENT_REQUIRED
| 403
| HTTP 1.0
| 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.
| HTTP_FORBIDDEN
| 404
| HTTP 1.0
| The server has not found anything matching the Request-URI. No
indication is given of whether the condition is temporary or
permanent. If the server does not wish to make this information
available to the client, the status code 403 (forbidden) can be
used instead.
| HTTP_NOT_FOUND
| 405
| HTTP 1.1
|
| HTTP_BAD_METHOD
| 406
| HTTP 1.1
|
| HTTP_NOT_AACCEPTABLE
| 407
| HTTP 1.1
|
| HTTP_PROXY_AUTH
| 408
| HTTP 1.1
|
| HTTP_CLIENT_TIMEOUT
| 409
| HTTP 1.1
|
| HTTP_CONFLICT
| 410
| HTTP 1.1
|
| HTTP_GONE
| 411
| HTTP 1.1
|
| HTTP_LENGTH_REQUIRED
| 412
| HTTP 1.1
|
| HTTP_PRECON_FAILED
| 413
| HTTP 1.1
|
| HTTP_ENTITY_TOO_LARGE
| 414
| HTTP 1.1
|
| HTTP_REQ_TOO_LONG
| 415
| HTTP 1.1
|
| HTTP_UNSUPPORTED_TYPE
| 416
| HTTP 1.1
|
| n.a.
| 417
| HTTP 1.1
|
| n.a.
| 5xx
|
| Server error
|
| 500
| HTTP 1.0
| The server encountered an unexpected condition which prevented it
from fulfilling the request.
| HTTP_SERVER_ERROR | HTTP_INTERNAL_ERROR 501
| HTTP 1.0
| The server does not support the functionality required to fulfill
the request. This is the appropriate response when the server does
not recognize the request method and is not capable of supporting
it for any resource.
| HTTP_NOT_IMPLEMENTED
| 502
| HTTP 1.0
| The server, while acting as a gateway or proxy, received an invalid
response from the upstream server it accessed in attempting to
fulfill the request.
| HTTP_BAD_GATEWAY
| 503
| HTTP 1.0
| The server is currently unable to handle the request due to a
temporary overloading or maintenance of the server. The implication
is that this is a temporary condition which will be alleviated
after some delay.
Note: The existence of the 503 status code does not imply
that a server must use it when becoming overloaded. Some
servers may wish to simply refuse the connection.
| HTTP_UNAVAILABLE
| 504
| HTTP 1.1
|
| HTTP_GATEWAY_TIMEOUT
| 505
| HTTP 1.1
|
| HTTP_VERSION
| |