Thursday, April 19, 2007

View 57 Apache Status Codes and ErrorDocuments

HTTP Status Codes


There are a total of 57 HTTP Status Codes recognized by the Apache Web Server.

Intro


I was trying to find an official, authoritative list of HTTP Status Codes but I kept finding lists that varied from one to another.. Then I found the lisdt in the Apache Source Code. (2 files attached below)

Once I compiled the list of Apache-recognized Status Codes, I was dying to try them all and see for myself on MY server what these unusual and rare headers would do. At first I thought I would have to create a script for each of the 57 Status Codes, a tedious undertaking I did not want to do. So I decided to check the Apache Docs to look for ambiguity around the sending of Status Codes with an Apache Directive.

Then while I was reading up on mod_alias and the Redirect directive I read this:

Syntax: Redirect [status] URL-path URL
The status argument can be used to return other HTTP status codes. Other status codes can be returned by giving the numeric status code as the value of status. If the status is between 300 and 399, the URL argument must be present, otherwise it must be omitted.

Quick Start to See Results


Let start with a quick and easy example. Add the following Redirect rules to your htaccess file. Don’t create a /e/ directory or any files.. Then open your browser and Request http://www.yoursite.com/e/400, Now do the same for http://www.yoursite.com/e/503 and finally http://www.yoursite.com/e/405

Redirect 400 /e/400
Redirect 503 /e/503
Redirect 405 /e/405

Now you definately should have a really good feeling about this!

Automating the process


The htaccess Redirects

When a Status code is encountered, Apache outputs the Header and the ErrorDocument for that error code. So you can view any Header and the default ErrorDocument, by causing that numerical error code, which is caused by the Status Code.

For instance, if you request a file that doesn’t exist, a 404 Not Found Header is issued and the corresponding ErrorDocument is served with the 404 Not Found Header.

Redirect 100 /e/100
Redirect 101 /e/101
Redirect 102 /e/102
Redirect 200 /e/200
Redirect 201 /e/201
Redirect 202 /e/202
Redirect 203 /e/203
Redirect 204 /e/204
Redirect 205 /e/205
Redirect 206 /e/206
Redirect 207 /e/207
Redirect 300 /e/300 http://www.yourdomain.com/?s=300
Redirect 301 /e/301 http://www.yourdomain.com/?s=301
Redirect 302 /e/302 http://www.yourdomain.com/?s=302
Redirect 303 /e/303 http://www.yourdomain.com/?s=303
Redirect 304 /e/304 http://www.yourdomain.com/?s=304
Redirect 305 /e/305 http://www.yourdomain.com/?s=305
Redirect 306 /e/306 http://www.yourdomain.com/?s=306
Redirect 307 /e/307 http://www.yourdomain.com/?s=307
Redirect 400 /e/400
Redirect 401 /e/401
Redirect 402 /e/402
Redirect 403 /e/403
Redirect 404 /e/404
Redirect 405 /e/405
Redirect 406 /e/406
Redirect 407 /e/407
Redirect 408 /e/408
Redirect 409 /e/409
Redirect 410 /e/410
Redirect 411 /e/411
Redirect 412 /e/412
Redirect 413 /e/413
Redirect 414 /e/414
Redirect 415 /e/415
Redirect 416 /e/416
Redirect 417 /e/417
Redirect 418 /e/418
Redirect 419 /e/419
Redirect 420 /e/420
Redirect 421 /e/421
Redirect 422 /e/422
Redirect 423 /e/423
Redirect 424 /e/424
Redirect 425 /e/425
Redirect 426 /e/426
Redirect 500 /e/500
Redirect 501 /e/501
Redirect 502 /e/502
Redirect 503 /e/503
Redirect 504 /e/504
Redirect 505 /e/505
Redirect 506 /e/506
Redirect 507 /e/507
Redirect 508 /e/508
Redirect 509 /e/509
Redirect 510 /e/510

PHP script that gets and outputs the Headers/Content

Now all I have to do is add 57 Redirect Directives to my htaccess, and then request each of them 1 at a time from my browser to see the result, and use a packet sniffing program like WireShark to see the Headers. Uh, scratch that, that would take way too long!

Instead I hacked up a simple php script using cURL to automate sending GET Requests to each of the 57 Redirect URL-paths. A side benefit of using the php script is that it performs all 57 Requests concurrently and saves each Requests returned headers and content to an output buffer. After all 57 have been queried, the output buffer is flushed to the browser.

$res)
{
foreach($res as $key)
{
$ch = curl_init("$SITENAME/e/$key");
$fp = fopen ($TMPSAVETO, "a");
curl_setopt ($ch, CURLOPT_FILE, $fp);
curl_setopt ($ch, CURLOPT_FOLLOWLOCATION ,1);
curl_setopt ($ch, CURLOPT_HEADER ,1);
curl_exec ($ch);
curl_close ($ch);
fclose ($fp);
}
}
$OUT='';
ob_start();
header ("Content-Type: text/plain;");
readfile($TMPSAVETO);
$OUT=ob_get_clean();
echo $OUT;
unlink($TMPSAVETO);
exit;
?>

57 APACHE HTTP STATUS RESPONSE CODES



Code Message Description
100 Continue
101 Switching Protocols
102 Processing
200 OK
201 Created
202 Accepted
203 Non-Authoritative Information
204 No Content
205 Reset Content
206 Partial Content
207 Multi-Status
300 Multiple Choices
301 Moved Permanently
302 Found
303 See Other
304 Not Modified
305 Use Proxy
306 unused
307 Temporary Redirect
400 Bad Request
401 Authorization Required
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
411 Length Required
412 Precondition Failed
413 Request Entity Too Large
414 Request-URI Too Large
415 Unsupported Media Type
416 Requested Range Not Satisfiable
417 Expectation Failed
418 unused
419 unused
420 unused
421 unused
422 Unprocessable Entity
423 Locked
424 Failed Dependency
425 No code
426 Upgrade Required
500 Internal Server Error
501 Method Not Implemented
502 Bad Gateway
503 Service Temporarily Unavailable
504 Gateway Time-out
505 HTTP Version Not Supported
506 Variant Also Negotiates
507 Insufficient Storage
508 unused
509 unused
510 Not Extended

Headers and Content Returned


100 Continue

HTTP/1.1 100 Continue
Date: Sun, 04 Mar 2007 10:01:11 GMT
Server: Apache/2.0.54 (Unix) PHP/4.4.4 mod_ssl/2.0.54 OpenSSL/0.9.7e mod_fastcgi/2.4.2 DAV/2 SVN/1.3.2
Vary: Accept-Encoding
Content-Length: 517
Content-Type: text/html; charset=iso-8859-1


100 Continue

Continue


The server encountered an internal error or
misconfiguration and was unable to complete
your request.


Please contact the server administrator,
spam@sitename.com and inform them of the time the error occurred,
and anything you might have done that may have
caused the error.


More information about this error may be available
in the server error log.




101 Switching Protocols

HTTP/1.1 101 Switching Protocols
Date: Sun, 04 Mar 2007 10:01:26 GMT
Server: Apache/2.0.54 (Unix) PHP/4.4.4 mod_ssl/2.0.54 OpenSSL/0.9.7e mod_fastcgi/2.4.2 DAV/2 SVN/1.3.2
Vary: Accept-Encoding
Content-Length: 539
Content-Type: text/html; charset=iso-8859-1



101 Switching Protocols

Switching Protocols


The server encountered an internal error or
misconfiguration and was unable to complete
your request.


Please contact the server administrator,
spam@sitename.com and inform them of the time the error occurred,
and anything you might have done that may have
caused the error.


More information about this error may be available
in the server error log.




102 Processing

HTTP/1.1 102 Processing
Date: Sun, 04 Mar 2007 10:01:26 GMT
Server: Apache/2.0.54 (Unix) PHP/4.4.4 mod_ssl/2.0.54 OpenSSL/0.9.7e mod_fastcgi/2.4.2 DAV/2 SVN/1.3.2
Vary: Accept-Encoding
Content-Length: 521
Content-Type: text/html; charset=iso-8859-1
X-Pad: avoid browser bug



102 Processing

Processing


The server encountered an internal error or
misconfiguration and was unable to complete
your request.


Please contact the server administrator,
spam@sitename.com and inform them of the time the error occurred,
and anything you might have done that may have
caused the error.


More information about this error may be available
in the server error log.




200 OK

HTTP/1.1 200 OK
Date: Sun, 04 Mar 2007 10:01:26 GMT
Server: Apache/2.0.54 (Unix) PHP/4.4.4 mod_ssl/2.0.54 OpenSSL/0.9.7e mod_fastcgi/2.4.2 DAV/2 SVN/1.3.2
Vary: Accept-Encoding
Content-Length: 505
Content-Type: text/html; charset=iso-8859-1



200 OK

OK


The server encountered an internal error or
misconfiguration and was unable to complete
your request.


Please contact the server administrator,
spam@sitename.com and inform them of the time the error occurred,
and anything you might have done that may have
caused the error.


More information about this error may be available
in the server error log.




201 Created

HTTP/1.1 201 Created
Date: Sun, 04 Mar 2007 10:01:26 GMT
Server: Apache/2.0.54 (Unix) PHP/4.4.4 mod_ssl/2.0.54 OpenSSL/0.9.7e mod_fastcgi/2.4.2 DAV/2 SVN/1.3.2
Vary: Accept-Encoding
Content-Length: 515
Content-Type: text/html; charset=iso-8859-1



201 Created

Created


The server encountered an internal error or
misconfiguration and was unable to complete
your request.


Please contact the server administrator,
spam@sitename.com and inform them of the time the error occurred,
and anything you might have done that may have
caused the error.


More information about this error may be available
in the server error log.




202 Accepted

HTTP/1.1 202 Accepted
Date: Sun, 04 Mar 2007 10:01:26 GMT
Server: Apache/2.0.54 (Unix) PHP/4.4.4 mod_ssl/2.0.54 OpenSSL/0.9.7e mod_fastcgi/2.4.2 DAV/2 SVN/1.3.2
Vary: Accept-Encoding
Content-Length: 517
Content-Type: text/html; charset=iso-8859-1



202 Accepted

Accepted


The server encountered an internal error or
misconfiguration and was unable to complete
your request.


Please contact the server administrator,
spam@sitename.com and inform them of the time the error occurred,
and anything you might have done that may have
caused the error.


More information about this error may be available
in the server error log.




203 Non-Authoritative Information

HTTP/1.1 203 Non-Authoritative Information
Date: Sun, 04 Mar 2007 10:01:26 GMT
Server: Apache/2.0.54 (Unix) PHP/4.4.4 mod_ssl/2.0.54 OpenSSL/0.9.7e mod_fastcgi/2.4.2 DAV/2 SVN/1.3.2
Vary: Accept-Encoding
Content-Length: 559
Content-Type: text/html; charset=iso-8859-1



203 Non-Authoritative Information

Non-Authoritative Information


The server encountered an internal error or
misconfiguration and was unable to complete
your request.


Please contact the server administrator,
spam@sitename.com and inform them of the time the error occurred,
and anything you might have done that may have
caused the error.


More information about this error may be available
in the server error log.




204 No Content

HTTP/1.1 204 No Content
Date: Sun, 04 Mar 2007 10:01:26 GMT
Server: Apache/2.0.54 (Unix) PHP/4.4.4 mod_ssl/2.0.54 OpenSSL/0.9.7e mod_fastcgi/2.4.2 DAV/2 SVN/1.3.2
Content-Length: 0
Content-Type: text/plain; charset=UTF-8


205 Reset Content

HTTP/1.1 205 Reset Content
Date: Sun, 04 Mar 2007 10:01:26 GMT
Server: Apache/2.0.54 (Unix) PHP/4.4.4 mod_ssl/2.0.54 OpenSSL/0.9.7e mod_fastcgi/2.4.2 DAV/2 SVN/1.3.2
Vary: Accept-Encoding
Content-Length: 527
Content-Type: text/html; charset=iso-8859-1



205 Reset Content

Reset Content


The server encountered an internal error or
misconfiguration and was unable to complete
your request.


Please contact the server administrator,
spam@sitename.com and inform them of the time the error occurred,
and anything you might have done that may have
caused the error.


More information about this error may be available
in the server error log.




206 Partial Content

HTTP/1.1 206 Partial Content
Date: Sun, 04 Mar 2007 10:01:26 GMT
Server: Apache/2.0.54 (Unix) PHP/4.4.4 mod_ssl/2.0.54 OpenSSL/0.9.7e mod_fastcgi/2.4.2 DAV/2 SVN/1.3.2
Vary: Accept-Encoding
Content-Length: 531
Content-Type: text/html; charset=iso-8859-1



206 Partial Content

Partial Content


The server encountered an internal error or
misconfiguration and was unable to complete
your request.


Please contact the server administrator,
spam@sitename.com and inform them of the time the error occurred,
and anything you might have done that may have
caused the error.


More information about this error may be available
in the server error log.




207 Multi-Status

HTTP/1.1 207 Multi-Status
Date: Sun, 04 Mar 2007 10:01:26 GMT
Server: Apache/2.0.54 (Unix) PHP/4.4.4 mod_ssl/2.0.54 OpenSSL/0.9.7e mod_fastcgi/2.4.2 DAV/2 SVN/1.3.2
Vary: Accept-Encoding
Content-Length: 525
Content-Type: text/html; charset=iso-8859-1
X-Pad: avoid browser bug



207 Multi-Status

Multi-Status


The server encountered an internal error or
misconfiguration and was unable to complete
your request.


Please contact the server administrator,
spam@sitename.com and inform them of the time the error occurred,
and anything you might have done that may have
caused the error.


More information about this error may be available
in the server error log.




300 Multiple Choices

HTTP/1.1 300 Multiple Choices
Date: Sun, 04 Mar 2007 10:01:26 GMT
Server: Apache/2.0.54 (Unix) PHP/4.4.4 mod_ssl/2.0.54 OpenSSL/0.9.7e mod_fastcgi/2.4.2 DAV/2 SVN/1.3.2
Location: http://www.yourdomain.com/?s=300
Vary: Accept-Encoding
Content-Length: 155
Content-Type: text/html; charset=iso-8859-1



300 Multiple Choices

Multiple Choices




301 Moved Permanently

HTTP/1.1 301 Moved Permanently
Date: Sun, 04 Mar 2007 10:01:26 GMT
Server: Apache/2.0.54 (Unix) PHP/4.4.4 mod_ssl/2.0.54 OpenSSL/0.9.7e mod_fastcgi/2.4.2 DAV/2 SVN/1.3.2
Location: http://www.yourdomain.com/?s=301
Vary: Accept-Encoding
Content-Length: 239
Content-Type: text/html; charset=iso-8859-1



301 Moved Permanently

Moved Permanently


The document has moved here.




302 Found

HTTP/1.1 302 Found
Date: Sun, 04 Mar 2007 10:01:26 GMT
Server: Apache/2.0.54 (Unix) PHP/4.4.4 mod_ssl/2.0.54 OpenSSL/0.9.7e mod_fastcgi/2.4.2 DAV/2 SVN/1.3.2
Location: http://www.yourdomain.com/?s=302
Vary: Accept-Encoding
Content-Length: 215
Content-Type: text/html; charset=iso-8859-1



302 Found

Found


The document has moved here.




303 See Other

HTTP/1.1 303 See Other
Date: Sun, 04 Mar 2007 10:01:26 GMT
Server: Apache/2.0.54 (Unix) PHP/4.4.4 mod_ssl/2.0.54 OpenSSL/0.9.7e mod_fastcgi/2.4.2 DAV/2 SVN/1.3.2
Location: http://www.yourdomain.com/?s=303
Vary: Accept-Encoding
Content-Length: 238
Content-Type: text/html; charset=iso-8859-1



303 See Other

See Other


The answer to your request is located here.




304 Not Modified

HTTP/1.1 304 Not Modified
Date: Sun, 04 Mar 2007 10:01:26 GMT
Server: Apache/2.0.54 (Unix) PHP/4.4.4 mod_ssl/2.0.54 OpenSSL/0.9.7e mod_fastcgi/2.4.2 DAV/2 SVN/1.3.2

305 Use Proxy

HTTP/1.1 305 Use Proxy
Date: Sun, 04 Mar 2007 10:01:26 GMT
Server: Apache/2.0.54 (Unix) PHP/4.4.4 mod_ssl/2.0.54 OpenSSL/0.9.7e mod_fastcgi/2.4.2 DAV/2 SVN/1.3.2
Location: http://www.yourdomain.com/?s=305
Vary: Accept-Encoding
Content-Length: 295
Content-Type: text/html; charset=iso-8859-1



305 Use Proxy

Use Proxy


This resource is only accessible through the proxy
http://www.yourdomain.com/?s=305

You will need to configure your client to use that proxy.




306 unused

HTTP/1.1 306 unused
Date: Sun, 04 Mar 2007 10:01:26 GMT
Server: Apache/2.0.54 (Unix) PHP/4.4.4 mod_ssl/2.0.54 OpenSSL/0.9.7e mod_fastcgi/2.4.2 DAV/2 SVN/1.3.2
Location: http://www.yourdomain.com/?s=306
Vary: Accept-Encoding
Content-Length: 513
Content-Type: text/html; charset=iso-8859-1



306 unused

unused


The server encountered an internal error or
misconfiguration and was unable to complete
your request.


Please contact the server administrator,
spam@sitename.com and inform them of the time the error occurred,
and anything you might have done that may have
caused the error.


More information about this error may be available
in the server error log.




307 Temporary Redirect

HTTP/1.1 307 Temporary Redirect
Date: Sun, 04 Mar 2007 10:01:26 GMT
Server: Apache/2.0.54 (Unix) PHP/4.4.4 mod_ssl/2.0.54 OpenSSL/0.9.7e mod_fastcgi/2.4.2 DAV/2 SVN/1.3.2
Location: http://www.yourdomain.com/?s=307
Vary: Accept-Encoding
Content-Length: 241
Content-Type: text/html; charset=iso-8859-1



307 Temporary Redirect

Temporary Redirect


The document has moved here.




400 Bad Request

HTTP/1.1 400 Bad Request
Date: Sun, 04 Mar 2007 10:01:26 GMT
Server: Apache/2.0.54 (Unix) PHP/4.4.4 mod_ssl/2.0.54 OpenSSL/0.9.7e mod_fastcgi/2.4.2 DAV/2 SVN/1.3.2
Vary: Accept-Encoding
Content-Length: 226
Connection: close
Content-Type: text/html; charset=iso-8859-1



400 Bad Request

Bad Request


Your browser sent a request that this server could not understand.




401 Authorization Required

HTTP/1.1 401 Authorization Required
Date: Sun, 04 Mar 2007 10:01:26 GMT
Server: Apache/2.0.54 (Unix) PHP/4.4.4 mod_ssl/2.0.54 OpenSSL/0.9.7e mod_fastcgi/2.4.2 DAV/2 SVN/1.3.2
Vary: Accept-Encoding
Content-Length: 520
Content-Type: text/html; charset=iso-8859-1



401 Authorization Required

Authorization Required


This server could not verify that you
are authorized to access the document
requested. Either you supplied the wrong
credentials (e.g., bad password), or your
browser doesn't understand how to supply
the credentials required.


Additionally, a 404 Not Found
error was encountered while trying to use an ErrorDocument to handle the request.




402 Payment Required

HTTP/1.1 402 Payment Required
Date: Sun, 04 Mar 2007 10:01:26 GMT
Server: Apache/2.0.54 (Unix) PHP/4.4.4 mod_ssl/2.0.54 OpenSSL/0.9.7e mod_fastcgi/2.4.2 DAV/2 SVN/1.3.2
Vary: Accept-Encoding
Content-Length: 533
Content-Type: text/html; charset=iso-8859-1



402 Payment Required

Payment Required


The server encountered an internal error or
misconfiguration and was unable to complete
your request.


Please contact the server administrator,
spam@sitename.com and inform them of the time the error occurred,
and anything you might have done that may have
caused the error.


More information about this error may be available
in the server error log.




403 Forbidden

HTTP/1.1 403 Forbidden
Date: Sun, 04 Mar 2007 10:01:26 GMT
Server: Apache/2.0.54 (Unix) PHP/4.4.4 mod_ssl/2.0.54 OpenSSL/0.9.7e mod_fastcgi/2.4.2 DAV/2 SVN/1.3.2
Vary: Accept-Encoding
Content-Length: 326
Content-Type: text/html; charset=iso-8859-1



403 Forbidden

Forbidden


You don't have permission to access /e/403
on this server.


Additionally, a 404 Not Found
error was encountered while trying to use an ErrorDocument to handle the request.




404 Not Found

HTTP/1.1 404 Not Found
Date: Sun, 04 Mar 2007 10:01:26 GMT
Server: Apache/2.0.54 (Unix) PHP/4.4.4 mod_ssl/2.0.54 OpenSSL/0.9.7e mod_fastcgi/2.4.2 DAV/2 SVN/1.3.2
Vary: Accept-Encoding
Content-Length: 203
Content-Type: text/html; charset=iso-8859-1



404 Not Found

Not Found


The requested URL /e/404 was not found on this server.




405 Method Not Allowed

HTTP/1.1 405 Method Not Allowed
Date: Sun, 04 Mar 2007 10:01:26 GMT
Server: Apache/2.0.54 (Unix) PHP/4.4.4 mod_ssl/2.0.54 OpenSSL/0.9.7e mod_fastcgi/2.4.2 DAV/2 SVN/1.3.2
Allow: TRACE
Vary: Accept-Encoding
Content-Length: 226
Content-Type: text/html; charset=iso-8859-1



405 Method Not Allowed

Method Not Allowed


The requested method GET is not allowed for the URL /e/405.




406 Not Acceptable

HTTP/1.1 406 Not Acceptable
Date: Sun, 04 Mar 2007 10:01:26 GMT
Server: Apache/2.0.54 (Unix) PHP/4.4.4 mod_ssl/2.0.54 OpenSSL/0.9.7e mod_fastcgi/2.4.2 DAV/2 SVN/1.3.2
Vary: Accept-Encoding
Content-Length: 256
Content-Type: text/html; charset=iso-8859-1



406 Not Acceptable

Not Acceptable


An appropriate representation of the requested resource /e/406 could not be found on this server.




407 Proxy Authentication Required

HTTP/1.1 407 Proxy Authentication Required
Date: Sun, 04 Mar 2007 10:01:26 GMT
Server: Apache/2.0.54 (Unix) PHP/4.4.4 mod_ssl/2.0.54 OpenSSL/0.9.7e mod_fastcgi/2.4.2 DAV/2 SVN/1.3.2
Vary: Accept-Encoding
Content-Length: 415
Content-Type: text/html; charset=iso-8859-1



407 Proxy Authentication Required

Proxy Authentication Required


This server could not verify that you
are authorized to access the document
requested. Either you supplied the wrong
credentials (e.g., bad password), or your
browser doesn't understand how to supply
the credentials required.




408 Request Time-out

HTTP/1.1 408 Request Time-out
Date: Sun, 04 Mar 2007 10:01:26 GMT
Server: Apache/2.0.54 (Unix) PHP/4.4.4 mod_ssl/2.0.54 OpenSSL/0.9.7e mod_fastcgi/2.4.2 DAV/2 SVN/1.3.2
Vary: Accept-Encoding
Content-Length: 223
Connection: close
Content-Type: text/html; charset=iso-8859-1



408 Request Time-out

Request Time-out


Server timeout waiting for the HTTP request from the client.




409 Conflict

HTTP/1.1 409 Conflict
Date: Sun, 04 Mar 2007 10:01:26 GMT
Server: Apache/2.0.54 (Unix) PHP/4.4.4 mod_ssl/2.0.54 OpenSSL/0.9.7e mod_fastcgi/2.4.2 DAV/2 SVN/1.3.2
Vary: Accept-Encoding
Content-Length: 517
Content-Type: text/html; charset=iso-8859-1



409 Conflict

Conflict


The server encountered an internal error or
misconfiguration and was unable to complete
your request.


Please contact the server administrator,
spam@sitename.com and inform them of the time the error occurred,
and anything you might have done that may have
caused the error.


More information about this error may be available
in the server error log.




410 Gone

HTTP/1.1 410 Gone
Date: Sun, 04 Mar 2007 10:01:26 GMT
Server: Apache/2.0.54 (Unix) PHP/4.4.4 mod_ssl/2.0.54 OpenSSL/0.9.7e mod_fastcgi/2.4.2 DAV/2 SVN/1.3.2
Vary: Accept-Encoding
Content-Length: 300
Content-Type: text/html; charset=iso-8859-1



410 Gone

Gone


The requested resource
/e/410

is no longer available on this server and there is no forwarding address.
Please remove all references to this resource.




411 Length Required

HTTP/1.1 411 Length Required
Date: Sun, 04 Mar 2007 10:01:26 GMT
Server: Apache/2.0.54 (Unix) PHP/4.4.4 mod_ssl/2.0.54 OpenSSL/0.9.7e mod_fastcgi/2.4.2 DAV/2 SVN/1.3.2
Vary: Accept-Encoding
Content-Length: 238
Connection: close
Content-Type: text/html; charset=iso-8859-1



411 Length Required

Length Required


A request of the requested method GET requires a valid Content-length.




412 Precondition Failed

HTTP/1.1 412 Precondition Failed
Date: Sun, 04 Mar 2007 10:01:26 GMT
Server: Apache/2.0.54 (Unix) PHP/4.4.4 mod_ssl/2.0.54 OpenSSL/0.9.7e mod_fastcgi/2.4.2 DAV/2 SVN/1.3.2
Vary: Accept-Encoding
Content-Length: 239
Content-Type: text/html; charset=iso-8859-1



412 Precondition Failed

Precondition Failed


The precondition on the request for the URL /e/412 evaluated to false.




413 Request Entity Too Large

HTTP/1.1 413 Request Entity Too Large
Date: Sun, 04 Mar 2007 10:01:27 GMT
Server: Apache/2.0.54 (Unix) PHP/4.4.4 mod_ssl/2.0.54 OpenSSL/0.9.7e mod_fastcgi/2.4.2 DAV/2 SVN/1.3.2
Vary: Accept-Encoding
Content-Length: 333
Connection: close
Content-Type: text/html; charset=iso-8859-1



413 Request Entity Too Large

Request Entity Too Large


The requested resource
/e/413

does not allow request data with GET requests, or the amount of data provided in
the request exceeds the capacity limit.


414 Request-URI Too Large

HTTP/1.1 414 Request-URI Too Large
Date: Sun, 04 Mar 2007 10:01:27 GMT
Server: Apache/2.0.54 (Unix) PHP/4.4.4 mod_ssl/2.0.54 OpenSSL/0.9.7e mod_fastcgi/2.4.2 DAV/2 SVN/1.3.2
Vary: Accept-Encoding
Content-Length: 250
Connection: close
Content-Type: text/html; charset=iso-8859-1



414 Request-URI Too Large

Request-URI Too Large


The requested URL's length exceeds the capacity
limit for this server.




415 Unsupported Media Type

HTTP/1.1 415 Unsupported Media Type
Date: Sun, 04 Mar 2007 10:01:27 GMT
Server: Apache/2.0.54 (Unix) PHP/4.4.4 mod_ssl/2.0.54 OpenSSL/0.9.7e mod_fastcgi/2.4.2 DAV/2 SVN/1.3.2
Vary: Accept-Encoding
Content-Length: 263
Content-Type: text/html; charset=iso-8859-1



415 Unsupported Media Type

Unsupported Media Type


The supplied request data is not in a format
acceptable for processing by this resource.




416 Requested Range Not Satisfiable

HTTP/1.1 416 Requested Range Not Satisfiable
Date: Sun, 04 Mar 2007 10:01:27 GMT
Server: Apache/2.0.54 (Unix) PHP/4.4.4 mod_ssl/2.0.54 OpenSSL/0.9.7e mod_fastcgi/2.4.2 DAV/2 SVN/1.3.2
Vary: Accept-Encoding
Content-Length: 314
Content-Type: text/html; charset=iso-8859-1

417 Expectation Failed

HTTP/1.1 417 Expectation Failed
Date: Sun, 04 Mar 2007 10:01:27 GMT
Server: Apache/2.0.54 (Unix) PHP/4.4.4 mod_ssl/2.0.54 OpenSSL/0.9.7e mod_fastcgi/2.4.2 DAV/2 SVN/1.3.2
Vary: Accept-Encoding
Content-Length: 292
Content-Type: text/html; charset=iso-8859-1



417 Expectation Failed

Expectation Failed


The expectation given in the Expect request-header
field could not be met by this server.


The client sent<pre>
Expect:



418 unused

HTTP/1.1 418 unused
Date: Sun, 04 Mar 2007 10:01:27 GMT
Server: Apache/2.0.54 (Unix) PHP/4.4.4 mod_ssl/2.0.54 OpenSSL/0.9.7e mod_fastcgi/2.4.2 DAV/2 SVN/1.3.2
Vary: Accept-Encoding
Content-Length: 513
Content-Type: text/html; charset=iso-8859-1



418 unused

unused


The server encountered an internal error or
misconfiguration and was unable to complete
your request.


Please contact the server administrator,
spam@sitename.com and inform them of the time the error occurred,
and anything you might have done that may have
caused the error.


More information about this error may be available
in the server error log.




419 unused

HTTP/1.1 419 unused
Date: Sun, 04 Mar 2007 10:01:27 GMT
Server: Apache/2.0.54 (Unix) PHP/4.4.4 mod_ssl/2.0.54 OpenSSL/0.9.7e mod_fastcgi/2.4.2 DAV/2 SVN/1.3.2
Vary: Accept-Encoding
Content-Length: 513
Content-Type: text/html; charset=iso-8859-1



419 unused

unused


The server encountered an internal error or
misconfiguration and was unable to complete
your request.


Please contact the server administrator,
spam@sitename.com and inform them of the time the error occurred,
and anything you might have done that may have
caused the error.


More information about this error may be available
in the server error log.




420 unused

HTTP/1.1 420 unused
Date: Sun, 04 Mar 2007 10:01:27 GMT
Server: Apache/2.0.54 (Unix) PHP/4.4.4 mod_ssl/2.0.54 OpenSSL/0.9.7e mod_fastcgi/2.4.2 DAV/2 SVN/1.3.2
Vary: Accept-Encoding
Content-Length: 513
Content-Type: text/html; charset=iso-8859-1



420 unused

unused


The server encountered an internal error or
misconfiguration and was unable to complete
your request.


Please contact the server administrator,
spam@sitename.com and inform them of the time the error occurred,
and anything you might have done that may have
caused the error.


More information about this error may be available
in the server error log.




421 unused

HTTP/1.1 421 unused
Date: Sun, 04 Mar 2007 10:01:27 GMT
Server: Apache/2.0.54 (Unix) PHP/4.4.4 mod_ssl/2.0.54 OpenSSL/0.9.7e mod_fastcgi/2.4.2 DAV/2 SVN/1.3.2
Vary: Accept-Encoding
Content-Length: 513
Content-Type: text/html; charset=iso-8859-1



421 unused

unused


The server encountered an internal error or
misconfiguration and was unable to complete
your request.


Please contact the server administrator,
spam@sitename.com and inform them of the time the error occurred,
and anything you might have done that may have
caused the error.


More information about this error may be available
in the server error log.




422 Unprocessable Entity

HTTP/1.1 422 Unprocessable Entity
Date: Sun, 04 Mar 2007 10:01:27 GMT
Server: Apache/2.0.54 (Unix) PHP/4.4.4 mod_ssl/2.0.54 OpenSSL/0.9.7e mod_fastcgi/2.4.2 DAV/2 SVN/1.3.2
Vary: Accept-Encoding
Content-Length: 285
Content-Type: text/html; charset=iso-8859-1



422 Unprocessable Entity

Unprocessable Entity


The server understands the media type of the
request entity, but was unable to process the
contained instructions.




423 Locked

HTTP/1.1 423 Locked
Date: Sun, 04 Mar 2007 10:01:27 GMT
Server: Apache/2.0.54 (Unix) PHP/4.4.4 mod_ssl/2.0.54 OpenSSL/0.9.7e mod_fastcgi/2.4.2 DAV/2 SVN/1.3.2
Vary: Accept-Encoding
Content-Length: 277
Content-Type: text/html; charset=iso-8859-1



423 Locked

Locked


The requested resource is currently locked.
The lock must be released or proper identification
given before the method can be applied.




424 Failed Dependency

HTTP/1.1 424 Failed Dependency
Date: Sun, 04 Mar 2007 10:01:27 GMT
Server: Apache/2.0.54 (Unix) PHP/4.4.4 mod_ssl/2.0.54 OpenSSL/0.9.7e mod_fastcgi/2.4.2 DAV/2 SVN/1.3.2
Vary: Accept-Encoding
Content-Length: 300
Content-Type: text/html; charset=iso-8859-1



424 Failed Dependency

Failed Dependency


The method could not be performed on the resource
because the requested action depended on another
action and that other action failed.




425 No code

HTTP/1.1 425 No code
Date: Sun, 04 Mar 2007 10:01:27 GMT
Server: Apache/2.0.54 (Unix) PHP/4.4.4 mod_ssl/2.0.54 OpenSSL/0.9.7e mod_fastcgi/2.4.2 DAV/2 SVN/1.3.2
Vary: Accept-Encoding
Content-Length: 515
Content-Type: text/html; charset=iso-8859-1



425 No code

No code


The server encountered an internal error or
misconfiguration and was unable to complete
your request.


Please contact the server administrator,
spam@sitename.com and inform them of the time the error occurred,
and anything you might have done that may have
caused the error.


More information about this error may be available
in the server error log.




426 Upgrade Required

HTTP/1.1 426 Upgrade Required
Date: Sun, 04 Mar 2007 10:01:27 GMT
Server: Apache/2.0.54 (Unix) PHP/4.4.4 mod_ssl/2.0.54 OpenSSL/0.9.7e mod_fastcgi/2.4.2 DAV/2 SVN/1.3.2
Vary: Accept-Encoding
Content-Length: 385
Content-Type: text/html; charset=iso-8859-1



426 Upgrade Required

Upgrade Required


The requested resource can only be retrieved
using SSL. The server is willing to upgrade the current
connection to SSL, but your client doesn't support it.
Either upgrade your client, or try requesting the page
using https://



500 Internal Server Error

HTTP/1.1 500 Internal Server Error
Date: Sun, 04 Mar 2007 10:01:27 GMT
Server: Apache/2.0.54 (Unix) PHP/4.4.4 mod_ssl/2.0.54 OpenSSL/0.9.7e mod_fastcgi/2.4.2 DAV/2 SVN/1.3.2
Vary: Accept-Encoding
Content-Length: 662
Connection: close
Content-Type: text/html; charset=iso-8859-1



500 Internal Server Error

Internal Server Error


The server encountered an internal error or
misconfiguration and was unable to complete
your request.


Please contact the server administrator,
spam@sitename.com and inform them of the time the error occurred,
and anything you might have done that may have
caused the error.


More information about this error may be available
in the server error log.


Additionally, a 404 Not Found
error was encountered while trying to use an ErrorDocument to handle the request.




501 Method Not Implemented

HTTP/1.1 501 Method Not Implemented
Date: Sun, 04 Mar 2007 10:01:27 GMT
Server: Apache/2.0.54 (Unix) PHP/4.4.4 mod_ssl/2.0.54 OpenSSL/0.9.7e mod_fastcgi/2.4.2 DAV/2 SVN/1.3.2
Allow: TRACE
Vary: Accept-Encoding
Content-Length: 210
Connection: close
Content-Type: text/html; charset=iso-8859-1



501 Method Not Implemented

Method Not Implemented


GET to /e/501 not supported.




502 Bad Gateway

HTTP/1.1 502 Bad Gateway
Date: Sun, 04 Mar 2007 10:01:27 GMT
Server: Apache/2.0.54 (Unix) PHP/4.4.4 mod_ssl/2.0.54 OpenSSL/0.9.7e mod_fastcgi/2.4.2 DAV/2 SVN/1.3.2
Vary: Accept-Encoding
Content-Length: 232
Content-Type: text/html; charset=iso-8859-1
X-Pad: avoid browser bug



502 Bad Gateway

Bad Gateway


The proxy server received an invalid
response from an upstream server.




503 Service Temporarily Unavailable

HTTP/1.1 503 Service Temporarily Unavailable
Date: Sun, 04 Mar 2007 10:01:27 GMT
Server: Apache/2.0.54 (Unix) PHP/4.4.4 mod_ssl/2.0.54 OpenSSL/0.9.7e mod_fastcgi/2.4.2 DAV/2 SVN/1.3.2
Vary: Accept-Encoding
Content-Length: 323
Connection: close
Content-Type: text/html; charset=iso-8859-1



503 Service Temporarily Unavailable

Service Temporarily Unavailable


The server is temporarily unable to service your
request due to maintenance downtime or capacity
problems. Please try again later.




504 Gateway Time-out

HTTP/1.1 504 Gateway Time-out
Date: Sun, 04 Mar 2007 10:01:27 GMT
Server: Apache/2.0.54 (Unix) PHP/4.4.4 mod_ssl/2.0.54 OpenSSL/0.9.7e mod_fastcgi/2.4.2 DAV/2 SVN/1.3.2
Vary: Accept-Encoding
Content-Length: 239
Content-Type: text/html; charset=iso-8859-1



504 Gateway Time-out

Gateway Time-out


The proxy server did not receive a timely response
from the upstream server.




505 HTTP Version Not Supported

HTTP/1.1 505 HTTP Version Not Supported
Date: Sun, 04 Mar 2007 10:01:27 GMT
Server: Apache/2.0.54 (Unix) PHP/4.4.4 mod_ssl/2.0.54 OpenSSL/0.9.7e mod_fastcgi/2.4.2 DAV/2 SVN/1.3.2
Vary: Accept-Encoding
Content-Length: 553
Content-Type: text/html; charset=iso-8859-1



505 HTTP Version Not Supported

HTTP Version Not Supported


The server encountered an internal error or
misconfiguration and was unable to complete
your request.


Please contact the server administrator,
spam@sitename.com and inform them of the time the error occurred,
and anything you might have done that may have
caused the error.


More information about this error may be available
in the server error log.




506 Variant Also Negotiates

HTTP/1.1 506 Variant Also Negotiates
Date: Sun, 04 Mar 2007 10:01:27 GMT
Server: Apache/2.0.54 (Unix) PHP/4.4.4 mod_ssl/2.0.54 OpenSSL/0.9.7e mod_fastcgi/2.4.2 DAV/2 SVN/1.3.2
Vary: Accept-Encoding
Content-Length: 304
Content-Type: text/html; charset=iso-8859-1



506 Variant Also Negotiates

Variant Also Negotiates


A variant for the requested resource
<pre>
/e/506
</pre>
is itself a negotiable resource. This indicates a configuration error.




507 Insufficient Storage

HTTP/1.1 507 Insufficient Storage
Date: Sun, 04 Mar 2007 10:01:27 GMT
Server: Apache/2.0.54 (Unix) PHP/4.4.4 mod_ssl/2.0.54 OpenSSL/0.9.7e mod_fastcgi/2.4.2 DAV/2 SVN/1.3.2
Vary: Accept-Encoding
Content-Length: 389
Content-Type: text/html; charset=iso-8859-1



507 Insufficient Storage

Insufficient Storage


The method could not be performed on the resource
because the server is unable to store the
representation needed to successfully complete the
request. There is insufficient free space left in
your storage allocation.




508 unused

HTTP/1.1 508 unused
Date: Sun, 04 Mar 2007 10:01:27 GMT
Server: Apache/2.0.54 (Unix) PHP/4.4.4 mod_ssl/2.0.54 OpenSSL/0.9.7e mod_fastcgi/2.4.2 DAV/2 SVN/1.3.2
Vary: Accept-Encoding
Content-Length: 513
Content-Type: text/html; charset=iso-8859-1



508 unused

unused


The server encountered an internal error or
misconfiguration and was unable to complete
your request.


Please contact the server administrator,
spam@sitename.com and inform them of the time the error occurred,
and anything you might have done that may have
caused the error.


More information about this error may be available
in the server error log.




509 unused

HTTP/1.1 509 unused
Date: Sun, 04 Mar 2007 10:01:27 GMT
Server: Apache/2.0.54 (Unix) PHP/4.4.4 mod_ssl/2.0.54 OpenSSL/0.9.7e mod_fastcgi/2.4.2 DAV/2 SVN/1.3.2
Vary: Accept-Encoding
Content-Length: 513
Content-Type: text/html; charset=iso-8859-1



509 unused

unused


The server encountered an internal error or
misconfiguration and was unable to complete
your request.


Please contact the server administrator,
spam@sitename.com and inform them of the time the error occurred,
and anything you might have done that may have
caused the error.


More information about this error may be available
in the server error log.




510 Not Extended

HTTP/1.1 510 Not Extended
Date: Sun, 04 Mar 2007 10:01:27 GMT
Server: Apache/2.0.54 (Unix) PHP/4.4.4 mod_ssl/2.0.54 OpenSSL/0.9.7e mod_fastcgi/2.4.2 DAV/2 SVN/1.3.2
Vary: Accept-Encoding
Content-Length: 247
Content-Type: text/html; charset=iso-8859-1
X-Pad: avoid browser bug



510 Not Extended

Not Extended


A mandatory extension policy in the request is not
accepted by the server for this resource.



Apache Source Code



httpd.h

From httpd.h

/**
* The size of the static array in http_protocol.c for storing
* all of the potential response status-lines (a sparse table).
* A future version should dynamically generate the apr_table_t at startup.
*/
#define RESPONSE_CODES 57
#define HTTP_CONTINUE 100
#define HTTP_SWITCHING_PROTOCOLS 101
#define HTTP_PROCESSING 102
#define HTTP_OK 200
#define HTTP_CREATED 201
#define HTTP_ACCEPTED 202
#define HTTP_NON_AUTHORITATIVE 203
#define HTTP_NO_CONTENT 204
#define HTTP_RESET_CONTENT 205
#define HTTP_PARTIAL_CONTENT 206
#define HTTP_MULTI_STATUS 207
#define HTTP_MULTIPLE_CHOICES 300
#define HTTP_MOVED_PERMANENTLY 301
#define HTTP_MOVED_TEMPORARILY 302
#define HTTP_SEE_OTHER 303
#define HTTP_NOT_MODIFIED 304
#define HTTP_USE_PROXY 305
#define HTTP_TEMPORARY_REDIRECT 307
#define HTTP_BAD_REQUEST 400
#define HTTP_UNAUTHORIZED 401
#define HTTP_PAYMENT_REQUIRED 402
#define HTTP_FORBIDDEN 403
#define HTTP_NOT_FOUND 404
#define HTTP_METHOD_NOT_ALLOWED 405
#define HTTP_NOT_ACCEPTABLE 406
#define HTTP_PROXY_AUTHENTICATION_REQUIRED 407
#define HTTP_REQUEST_TIME_OUT 408
#define HTTP_CONFLICT 409
#define HTTP_GONE 410
#define HTTP_LENGTH_REQUIRED 411
#define HTTP_PRECONDITION_FAILED 412
#define HTTP_REQUEST_ENTITY_TOO_LARGE 413
#define HTTP_REQUEST_URI_TOO_LARGE 414
#define HTTP_UNSUPPORTED_MEDIA_TYPE 415
#define HTTP_RANGE_NOT_SATISFIABLE 416
#define HTTP_EXPECTATION_FAILED 417
#define HTTP_UNPROCESSABLE_ENTITY 422
#define HTTP_LOCKED 423
#define HTTP_FAILED_DEPENDENCY 424
#define HTTP_UPGRADE_REQUIRED 426
#define HTTP_INTERNAL_SERVER_ERROR 500
#define HTTP_NOT_IMPLEMENTED 501
#define HTTP_BAD_GATEWAY 502
#define HTTP_SERVICE_UNAVAILABLE 503
#define HTTP_GATEWAY_TIME_OUT 504
#define HTTP_VERSION_NOT_SUPPORTED 505
#define HTTP_VARIANT_ALSO_VARIES 506
#define HTTP_INSUFFICIENT_STORAGE 507
#define HTTP_NOT_EXTENDED 510

/** is the status code informational */
#define ap_is_HTTP_INFO(x) (((x) >= 100)&&((x) <>= 200)&&((x) <>= 300)&&((x) <>= 400)&&((x) <>= 400)&&((x) <>= 500)&&((x) <>= 100)&&((x) <> 0, 101 -> 1, 200 -> 2 ...
* The number of status lines must equal the value of RESPONSE_CODES (httpd.h)
* and must be listed in order.
*/

static const char * status_lines[RESPONSE_CODES] =
#else
static const char * const status_lines[RESPONSE_CODES] =
#endif
{
"100 Continue",
"101 Switching Protocols",
"102 Processing",
#define LEVEL_200 3
"200 OK",
"201 Created",
"202 Accepted",
"203 Non-Authoritative Information",
"204 No Content",
"205 Reset Content",
"206 Partial Content",
"207 Multi-Status",
#define LEVEL_300 11
"300 Multiple Choices",
"301 Moved Permanently",
"302 Found",
"303 See Other",
"304 Not Modified",
"305 Use Proxy",
"306 unused",
"307 Temporary Redirect",
#define LEVEL_400 19
"400 Bad Request",
"401 Authorization Required",
"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",
"411 Length Required",
"412 Precondition Failed",
"413 Request Entity Too Large",
"414 Request-URI Too Large",
"415 Unsupported Media Type",
"416 Requested Range Not Satisfiable",
"417 Expectation Failed",
"418 unused",
"419 unused",
"420 unused",
"421 unused",
"422 Unprocessable Entity",
"423 Locked",
"424 Failed Dependency",
/* This is a hack, but it is required for ap_index_of_response
* to work with 426.
*/
"425 No code",
"426 Upgrade Required",
#define LEVEL_500 46
"500 Internal Server Error",
"501 Method Not Implemented",
"502 Bad Gateway",
"503 Service Temporarily Unavailable",
"504 Gateway Time-out",
"505 HTTP Version Not Supported",
"506 Variant Also Negotiates",
"507 Insufficient Storage",
"508 unused",
"509 unused",
"510 Not Extended"
};

No comments: