Appendix B
Server Status Codes
Stronghold automatically determines the correct status codes to include in each response header. However, you can also manipulate these codes using metafiles, PHP scripts, and other mechanisms. It's also important to understand them for log analysis purposes.
There are five types of status codes:
Informational Status Codes
Stronghold sends an informational status code when it has received a request and is in the process of fulfilling it. The client is not required to take any action when it receives an informational status code.
100 Continue
Stronghold has received the initial part of a multipart request. This code indicates that the client may continue when ready.
101 Switching Protocols
Stronghold is complying with a client request to switch to a protocol specified in an Upgrade request header.
Client Request Successful
Stronghold returns a status code between 200 and 299 when it successfully fulfills a client request.
200 OK
This code simply indicates that the request succeeded and that the requested document is attached.
201 Created
Stronghold has successfully created a new URI, specified in a Location header.
202 Accepted
Stronghold has accepted the client request, although it may not fulfill the request immediately (or at all). The message body can contain more information about the response.
203 Non-Authoritative Information
The information in the response header did not originate with Stronghold, but was copied from another server.
204 No Content
The response contains only a header, without a message body. The client continues to display the current document. This is useful when a user clicks a blank area of an imagemap, for example.
205 Reset Content
This code instructs the client to clear all values from the HTML form used for this transaction.
206 Partial Content
Stronghold uses this code to respond to Range requests, and uses a Content-Range header to indicate which data segment is attached.
Request Redirected
Stronghold returns a status code between 300 and 399 when it cannot fulfill the request because the client must take further action.
300 Multiple Choices
The client requested a URI that refers to more than one document, such as a document that exists in several different languages or formats. The message body can contains more information about the available versions.
301 Moved Permanently
Stronghold did not fulfill the request because the URI no longer exists. Along with this code, the server sends a Location header that indicates the requested document's new URI. The client directs all future requests to the new URI.
302 Moved Temporarily
Stronghold did not fulfill the request because the URI has temporarily changed. Along with this code, the server sends a Location header to indicate the temporary URI of the requested document. The client continues to use the old URI in future requests.
303 See Other
This code instructs the client to use the GET method to retrieve the request document at a different URI, indicated by the Location header.
304 Not Modified
Stronghold uses this code to respond to the If-Modified-Since request header. It indicates that the requested document has not been modified since the specified date, and that the client should use its cached copy.
305 Use Proxy
Stronghold uses this code to instruct the client to access the URI through a proxy specified by the Location header.
Client Request Incomplete
Stronghold returns a status code between 400 and 499 when it receives an incomplete client request. In most cases, these indicate that the client must send more information.
400 Bad Request
Stronghold detected a syntax error in the client request.
401 Unauthorized
The client request did not include the proper authentication data. Along with this code, Stronghold sends the WWW-Authenticate header to indicate the authentication type and realm for the requested URI.
402 Payment Required
HTTP does not yet implement this code.
403 Forbidden
Stronghold uses this code to indicate that the client is forbidden to access the requested URI for reasons the server cannot or will not disclose.
404 Not Found
The requested document does not exist.
405 Method Not Allowed
Stronghold does not support the method used by the client for the requested URI. This code is accompanied by the Allow header, which indicates which methods are acceptable.
406 Not Acceptable
The requested document does not exist in a format the client can accept. Stronghold accompanies this code with Content-Language, Content-Encoding, and Content-Type headers to indicate which formats are available.
407 Proxy Authentication Required
When acting as a proxy server, Stronghold uses this code to indicate that it must authenticate the request before forwarding it to the remote server. The Proxy-Authenticate header indicates the authentication scheme and realm for the requested URI.
408 Request Time-Out
The client did not complete its request within the required time, specified in httpd.conf by the KeepAliveTimeout directive. Stronghold sends this status code, then closes the connection.
409 Conflict
The client request conflicts with another request, or with Stronghold's configuration. The message body can contain more information about the conflict.
410 Gone
Stronghold uses this code to indicate that the requested URI has been permanently removed from the site.
411 Length Required
The client must supply a Content-Length header in its request.
412 Precondition Failed
When a client send a request with one or more If. . . headers, Stronghold uses this code to indicate that one or more if the conditions specified in these headers is false.
413 Request Entity Too Large
Stronghold refuses to process the request because its message body is too large.
414 Request-URI Too Long
Stronghold refuses to process the request because the specified URI is too long.
415 Unsupported Media Type
Stronghold refuses to process the request because it does not support the message body's format.
Server Errors
Stronghold returns a status code between 500 and 599 when it encounters an error and cannot fulfill the request.
500 Internal Server Error
The server has encountered a configuration error, or one of its peripheral programs has crashed.
501 Not Implemented
Stronghold cannot perform the action requested by the client.
502 Bad Gateway
The server or proxy encountered an invalid response from another server or proxy.
503 Service Unavailable
The service is temporarily unavailable. If possible, Stronghold may send a Retry-After header to indicate when the service may be restored.
504 Gateway Time-out
The gateway or proxy has timed out.
505 HTTP Version not supported
Stronghold does not support the HTTP version used in the client request.