HTTP 1.0 Status Codes and Reason Phrases

Clients can receive an HTTP status code and matching reason phrase after making a request to the IIS server.

The Hypertext Transport Protocol (HTTP) defines status codes and reason phrases that HTTP servers such as Internet Information Server can return to clients.

Status codes are returned by the server in response to a request. The three-digit code acknowledges an attempt to understand and satisfy the request. The reason phrase gives a short description of the status code.

Note

This section describes the status codes and reason phrases from the HTTP 1.0 Internet-draft. Note that Internet-drafts are valid for a maximum of six months. You should check the full text of the latest draft for the most current information. To learn the current status of any Internet draft, use FTP to check the 1id-abstracts.txt file in the Internet-Drafts directory on ftp.is.co.za (Africa), nic.nordu.net (Europe), munnari.oz.au (Pacific Rim), ds.internic.net (US East Coast), or ftp.isi.edu (US West Coast).

The first digit of the status code defines the class of response. There are five possible values for the first digit of the status code. Table 8.1 lists the five classes of codes and the reasons they are returned by the server.

Table 8.1 HTTP 1.0 Status Code Classification

Code

Class

Use

1xx

Informational

Not used, but reserved for future use.

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 incorrect syntax or cannot be fulfilled.

5xx

Server Error

The server failed to fulfill an apparently valid request.


Table 8.2 presents the individual values of the numeric status codes defined for HTTP 1.0. The reason phrases listed here are those that are recommended by the HTTP 1.0 protocol and are used by Internet Information Server.

Table 8.2 HTTP 1.0 Status Codes, Reason Phrases, and Meanings

Status code

Reason phrase

Meaning

200

OK

The request has succeeded. The information returned with the response is dependent on the method used in the request, as follows:

GET An entity1 corresponding to the requested resource is being sent in the response.

HEAD The response must contain only the header information and no Entity-Body.

POST An entity describing or containing the result of the action is being sent in the response.

301

Moved permanently

The requested resource has been assigned a new permanent URL and any future references to this resource should use that URL.

302

Moved temporarily

The requested resource resides temporarily under a different URL. Because the redirection is sometimes altered, the client should continue to use the Request-URI2 for future requests.

304

Not modified

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 responds with this status code and does not send an Entity-Body to the client. Header fields contained in the response should include only information that is relevant to cache managers and that may have changed independently of the date specified in the entity's Last-Modified field. Examples of relevant header fields include Date, Server, and Expires.

400

Bad request

The request could not be understood by the server because of incorrect syntax.

401

Unauthorized

The request requires user authentication.

403

Forbidden

The server understood the request, but refuses to perform the request for an unspecified reason. Authentication will not help and the request should not be repeated.

404

Not found

The server has not found anything matching the Request-URI. The server does not indicate whether the condition is temporary or permanent.

500

Internal server error

The server encountered an unexpected condition that prevented it from fulfilling the request.

501

Not implemented

The server does not support the functionality required to fulfill the request.

502

Bad gateway

The server received an invalid response from the gateway or upstream server it accessed in attempting to fulfill the request.


1 An entity is a particular representation or rendition of a resource that may be enclosed within a request or response message. An entity consists of metainformation in the form of entity headers, and content in the form of an entity body.

2 Uniform Resource Identifier; see the HTTP 1.0 specification for an explanation of URI.

HTTP status codes are extensible, but the codes in Table 8.2 are the only codes that are recognized in current practice and are used by Internet Information Server.