Appendix D

HTTP/1.1 Status Codes and Reason Phrases (IETF RFC 2616)

The status code element is a three-digit integer result code of the attempt to understand and satisfy the request. The reason phrase exists for the sole purpose of providing a textual description associated with the numeric status code, done out of deference to earlier Internet application protocols that were more frequently used with interactive text clients. A client should ignore the content of the reason phrase. The reason phrases listed are only recommendations and may be replaced by local equivalents without affecting the protocol.

The first digit of the status code defines the class of response. The last two digits do not have any categorization role. There are five values for the first digit:

  • 1xx: Informational: Request received, continuing process
  • 2xx: Success: The action was successfully received, understood, and accepted
  • 3xx: Redirection: Further action must be taken in order to complete the request
  • 4xx: Client Error: The request contains bad syntax or cannot be fulfilled
  • 5xx: Server Error: The server failed to fulfill an apparently valid request

    Response Class

    Status Code

    Reason Phrase

    1xx: Informational: Request received, continuing process

    100

    Continue

    101

    Switching protocols

    2xx: Success:

    The action was successfully received, understood, and accepted

    200

    OK

    201

    Created

    202

    Accepted

    203

    Nonauthoritative

    204

    No Content

    205

    Reset Content

    206

    Partial Content

    3xx: Redirection:

    Further action must be taken in order to complete the request

    300

    Multiple Choices

    301

    Moved Permanently

    302

    Found

    303

    See Other

    304

    Not Modified

    305

    Use Proxy

    307

    Temporary Redirect

    4xx: Client Error:

    The request contains bad syntax or cannot be fulfilled

    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 Time-out

    409

    Conflict

    410

    Gone

    4xx: Client Error:

    The request contains bad syntax or cannot be fulfilled

    411

    Length Required

    412

    Precondition Failed

    413

    Request Entity Too Large

    414

    URI Too Long

    415

    Unsupported Media Type

    416

    Request range not satisfiable

    417

    Expectation Failed

    5xx: Server Error:

    The server failed to fulfill an apparently valid request

    500

    Internal Server Error

    501

    Not Implemented

    502

    Bad Gateway

    503

    Service Unavailable

    504

    Gateway Time-out

    505

    HTTP Version not supported

HTTP status codes are extensible. HTTP applications are not required to understand the meaning of all registered status codes, although such understanding is obviously desirable. However, applications must understand the class of any status code, as indicated by the first digit, and treat any unrecognized response as being equivalent to the x00 status code of that class, with the exception that an unrecognized response must not be cached. For example, if an unrecognized status code of 431 is received by the client, it can safely assume that there was something wrong with its request and treat the response as if it had received a 400 status code.

For a complete understanding of the status codes and their response phases, it is recommended that you consult the IETF RFC 2616 publication.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.186.219