ABSOLUTELY NO WARRANTY | free software

List of 57 HTTP Status Codes and Apache htaccess file ErrorDocuments

Address:
http://www.askapache.com/htaccess/apache-status-code-headers-errordocument.html

January 4th, 2008

« Surf the net anonymously with TorApache Environment Variables CGI Script »

I was trying to find an official, authoritative list of HTTP Status Codes but I kept finding lists that weren’t authoritative or complete. So I searched and found my answer in the Apache HTTP Server source code. Once I had the exact HTTP Status Codes and resulting Error Documents sent by Apache, I researched deeper into HTTP Status Codes by reading as many related RFC’s as I could find, and several other software source codes were explored. This is the most authoritative list I know of, if you can do better leave a comment and I’ll update it. Another thing to keep in mind, the Status code number itself is what is used by software and hardware to make determinations, the phrase returned by the status code is for the human only and does not have any weight other than informing the user.. So “503 Service Unavailable”, “503 Service Temporarily Unavailable”, and “503 Get the heck outta here” are all completely valid.

Update March 9, 2009: A lot of sites on the web have updated their HTTP status code lists to include the HTTP Status codes listed on this page, including Wikipedia, IANA, W3C, and others, so rest assured this info is accurate and complete. If you’d like to see how to create custom error pages for all of these errors like mine /show-error-506, then check out this detailed tutorial I just posted. Contents

  • List of All 57 HTTP Response Status Code

  • Quick Start to triggering ErrorDocuments for each Status Code

  • Automate the ErrorDocument Triggering

    o The htaccess Code o PHP script that gets and outputs the Headers/Content

  • Headers and Content Returned

  • Apache Source Code

    o httpd.h o http_protocol.c

WordPress 2.8 Changes

I just learned that my modification to the WordPress core was accepted and will be implemented for version 2.8! This may mean WordPress is the only 100% HTTP/1.1 compliant software on the net! Below is the new list (I thought someone out there could use the php array) and as you can see, unfortunately 418 I’m a teapot didn’t make it ;)

$wp_header_to_desc = array(

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', 226 => 'IM Used',

300 => 'Multiple Choices', 301 => 'Moved Permanently', 302 => 'Found', 303 => 'See Other', 304 => 'Not Modified', 305 => 'Use Proxy', 306 => 'Reserved', 307 => 'Temporary Redirect',

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 Timeout', 409 => 'Conflict', 410 => 'Gone', 411 => 'Length Required', 412 => 'Precondition Failed', 413 => 'Request Entity Too Large', 414 => 'Request-URI Too Long', 415 => 'Unsupported Media Type', 416 => 'Requested Range Not Satisfiable', 417 => 'Expectation Failed', 422 => 'Unprocessable Entity', 423 => 'Locked', 424 => 'Failed Dependency', 426 => 'Upgrade Required',

500 => 'Internal Server Error', 501 => 'Not Implemented', 502 => 'Bad Gateway', 503 => 'Service Unavailable', 504 => 'Gateway Timeout', 505 => 'HTTP Version Not Supported', 506 => 'Variant Also Negotiates', 507 => 'Insufficient Storage', 510 => 'Not Extended'

System Message: WARNING/2 (<string>, line 87)

Definition list ends without a blank line; unexpected unindent.

);

57 APACHE HTTP STATUS RESPONSE CODES

Once I compiled the list of Apache recognized HTTP Status Codes, I was dying to see them all in action (i.e. the corresponding ErrorDocument). At first I thought I would have to create a php or perl script emulating each of the 57 HTTP Status Codes, a tedious undertaking I wasn’t about to do. Instead I “asked Apache” by searching the Apache HTTP Documentation for ambiguity sending Status Codes and/or triggering ErrorDocuments with an Apache Directive. While reading up on mod_alias and the Redirect directive I found:

Apache Docs

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.

1xx Info / Informational

HTTP_INFO – Request received, continuing process. Indicates a provisional response, consisting only of the Status-Line and optional headers, and is terminated by an empty line.

  • 100 Continue – HTTP_CONTINUE
  • 101 Switching Protocols – HTTP_SWITCHING_PROTOCOLS
  • 102 Processing – HTTP_PROCESSING

2xx Success / OK

HTTP_SUCCESS – The action was successfully received, understood, and accepted. Indicates that the client’s request was successfully received, understood, and accepted.

  • 200 OK – HTTP_OK
  • 201 Created – HTTP_CREATED
  • 202 Accepted – HTTP_ACCEPTED
  • 203 Non-Authoritative Information – HTTP_NON_AUTHORITATIVE
  • 204 No Content – HTTP_NO_CONTENT
  • 205 Reset Content – HTTP_RESET_CONTENT
  • 206 Partial Content – HTTP_PARTIAL_CONTENT
  • 207 Multi-Status – HTTP_MULTI_STATUS

3xx Redirect

HTTP_REDIRECT – The client must take additional action to complete the request. Indicates that further action needs to be taken by the user-agent in order to fulfill the request. The action required may be carried out by the user agent without interaction with the user if and only if the method used in the second request is GET or HEAD. A user agent should not automatically redirect a request more than 5 times, since such redirections usually indicate an infinite loop.

  • 300 Multiple Choices – HTTP_MULTIPLE_CHOICES
  • 301 Moved Permanently – HTTP_MOVED_PERMANENTLY
  • 302 Found – HTTP_MOVED_TEMPORARILY
  • 303 See Other – HTTP_SEE_OTHER
  • 304 Not Modified – HTTP_NOT_MODIFIED
  • 305 Use Proxy – HTTP_USE_PROXY
  • 306 unused – UNUSED
  • 307 Temporary Redirect – HTTP_TEMPORARY_REDIRECT

4xx Client Error

HTTP_CLIENT_ERROR – The request contains bad syntax or cannot be fulfilled. Indicates case where client seems to have erred. Except when responding to a HEAD request, the server should include an entity containing an explanation of the error situation, and whether it is a temporary or permanent condition.

  • 400 Bad Request – HTTP_BAD_REQUEST
  • 401 Authorization Required – HTTP_UNAUTHORIZED
  • 402 Payment Required – HTTP_PAYMENT_REQUIRED
  • 403 Forbidden – HTTP_FORBIDDEN
  • 404 Not Found – HTTP_NOT_FOUND
  • 405 Method Not Allowed – HTTP_METHOD_NOT_ALLOWED
  • 406 Not Acceptable – HTTP_NOT_ACCEPTABLE
  • 407 Proxy Authentication Required – HTTP_PROXY_AUTHENTICATION_REQUIRED
  • 408 Request Time-out – HTTP_REQUEST_TIME_OUT
  • 409 Conflict – HTTP_CONFLICT
  • 410 Gone – HTTP_GONE
  • 411 Length Required – HTTP_LENGTH_REQUIRED
  • 412 Precondition Failed – HTTP_PRECONDITION_FAILED
  • 413 Request Entity Too Large – HTTP_REQUEST_ENTITY_TOO_LARGE
  • 414 Request-URI Too Large – HTTP_REQUEST_URI_TOO_LARGE
  • 415 Unsupported Media Type – HTTP_UNSUPPORTED_MEDIA_TYPE
  • 416 Requested Range Not Satisfiable – HTTP_RANGE_NOT_SATISFIABLE
  • 417 Expectation Failed – HTTP_EXPECTATION_FAILED
  • 418 I’m a teapot – UNUSED
  • 419 unused – UNUSED
  • 420 unused – UNUSED
  • 421 unused – UNUSED
  • 422 Unprocessable Entity – HTTP_UNPROCESSABLE_ENTITY
  • 423 Locked – HTTP_LOCKED
  • 424 Failed Dependency – HTTP_FAILED_DEPENDENCY
  • 425 No code – HTTP_NO_CODE
  • 426 Upgrade Required – HTTP_UPGRADE_REQUIRED

5xx Server Error

HTTP_SERVER_ERROR – The server failed to fulfill an apparently valid request. Indicate cases in which the server is aware that it has erred or is incapable of performing the request. Except when responding to a HEAD request, the server should include an entity containing an explanation of the error situation, and whether it is a temporary or permanent condition. User agents should display any included entity to the user. These response codes are applicable to any request method.

  • 500 Internal Server Error – HTTP_INTERNAL_SERVER_ERROR
  • 501 Method Not Implemented – HTTP_NOT_IMPLEMENTED
  • 502 Bad Gateway – HTTP_BAD_GATEWAY
  • 503 Service Temporarily Unavailable – HTTP_SERVICE_UNAVAILABLE
  • 504 Gateway Time-out – HTTP_GATEWAY_TIME_OUT
  • 505 HTTP Version Not Supported – HTTP_VERSION_NOT_SUPPORTED
  • 506 Variant Also Negotiates – HTTP_VARIANT_ALSO_VARIES
  • 507 Insufficient Storage – HTTP_INSUFFICIENT_STORAGE
  • 508 unused – UNUSED
  • 509 unused – UNUSED
  • 510 Not Extended – HTTP_NOT_EXTENDED

Quick Start to triggering ErrorDocuments for each Status Code

Let start with a quick and easy example. Add the following Redirect rules to your htaccess file, then open your browser and goto each url like yoursite.com/e/400. Don’t create an /e/ directory or any files.

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

Apache ErrorDocument Results error 503 Automate the ErrorDocument Triggering 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.askapache.com/?s=300 Redirect 301 /e/301 http://www.askapache.com/?s=301 Redirect 302 /e/302 http://www.askapache.com/?s=302 Redirect 303 /e/303 http://www.askapache.com/?s=303 Redirect 304 /e/304 http://www.askapache.com/?s=304 Redirect 305 /e/305 http://www.askapache.com/?s=305 Redirect 306 /e/306 http://www.askapache.com/?s=306 Redirect 307 /e/307 http://www.askapache.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.

< ?php $SITENAME='http://www.askapache.com';

$CODES = array(array('100','101','102'), array('200','201','202','203','204','205','206','207'), array('300','301','302','303','304','305','306','307'), array('400','401','402','403','404','405','406','407','408','409','410','411','412','413', '414','415','416','417','418','419','420','421','422','423','424','425','426'), array('500','501','502','503','504','505','506','507','508','509','510'));

$TMPSAVETO='/tmp/'.time().'.txt';

# if file exists then delete it if(is_file($TMPSAVETO))unlink($TMPSAVETO);

foreach($CODES as $keyd => $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; ?>

Headers and Content Returned 100 Continue

HTTP/1.1 100 Continue

<html><head><title>100 Continue</title></head><body> <h1>Continue</h1> <p>The server encountered an internal error or misconfigurationand was unable to complete your request.</p> <p>Please contact the server administrator, a@s.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.</p> <p>More information about this error may be available in the server error log.</p> </body></html>

101 Switching Protocols

HTTP/1.1 101 Switching Protocols

<html><head><title>101 Switching Protocols</title></head><body> <h1>Switching Protocols</h1> <p>The server encountered an internal error or misconfigurationand was unable to complete your request.</p> <p>Please contact the server administrator, a@s.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.</p> <p>More information about this error may be available in the server error log.</p> </body></html>

102 Processing

HTTP/1.1 102 Processing X-Pad: avoid browser bug

<html><head><title>102 Processing</title></head><body> <h1>Processing</h1> <p>The server encountered an internal error or misconfigurationand was unable to complete your request.</p> <p>Please contact the server administrator, a@s.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.</p> <p>More information about this error may be available in the server error log.</p> </body></html>

200 OK

HTTP/1.1 200 OK

<html><head><title>200 OK</title></head><body> <h1>OK</h1> <p>The server encountered an internal error or misconfigurationand was unable to complete your request.</p> <p>Please contact the server administrator, a@s.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.</p> <p>More information about this error may be available in the server error log.</p> </body></html>

201 Created

HTTP/1.1 201 Created

<html><head><title>201 Created</title></head><body> <h1>Created</h1> <p>The server encountered an internal error or misconfigurationand was unable to complete your request.</p> <p>Please contact the server administrator, a@s.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.</p> <p>More information about this error may be available in the server error log.</p> </body></html>

202 Accepted

HTTP/1.1 202 Accepted

<html><head><title>202 Accepted</title></head><body> <h1>Accepted</h1> <p>The server encountered an internal error or misconfigurationand was unable to complete your request.</p> <p>Please contact the server administrator, a@s.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.</p> <p>More information about this error may be available in the server error log.</p> </body></html>

203 Non-Authoritative Information

HTTP/1.1 203 Non-Authoritative Information

<html><head><title>203 Non-Authoritative Information</title></head><body> <h1>Non-Authoritative Information</h1> <p>The server encountered an internal error or misconfigurationand was unable to complete your request.</p> <p>Please contact the server administrator, a@s.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.</p> <p>More information about this error may be available in the server error log.</p> </body></html>

204 No Content

HTTP/1.1 204 No Content Content-Type: text/plain; charset=UTF-8

205 Reset Content

HTTP/1.1 205 Reset Content

<html><head><title>205 Reset Content</title></head><body> <h1>Reset Content</h1> <p>The server encountered an internal error or misconfigurationand was unable to complete your request.</p> <p>Please contact the server administrator, a@s.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.</p> <p>More information about this error may be available in the server error log.</p> </body></html>

206 Partial Content

HTTP/1.1 206 Partial Content

<html><head><title>206 Partial Content</title></head><body> <h1>Partial Content</h1> <p>The server encountered an internal error or misconfigurationand was unable to complete your request.</p> <p>Please contact the server administrator, a@s.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.</p> <p>More information about this error may be available in the server error log.</p> </body></html>

207 Multi-Status

HTTP/1.1 207 Multi-Status X-Pad: avoid browser bug

<html><head><title>207 Multi-Status</title></head><body> <h1>Multi-Status</h1> <p>The server encountered an internal error or misconfigurationand was unable to complete your request.</p> <p>Please contact the server administrator, a@s.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.</p> <p>More information about this error may be available in the server error log.</p> </body></html>

300 Multiple Choices

HTTP/1.1 300 Multiple Choices Location: http://www.askapache.com/?s=300

<html><head><title>300 Multiple Choices</title></head><body> <h1>Multiple Choices</h1> </body></html>

301 Moved Permanently

HTTP/1.1 301 Moved Permanently Location: http://www.askapache.com/?s=301

<html><head><title>301 Moved Permanently</title></head><body> <h1>Moved Permanently</h1> <p>The document has moved <a href="http://www.askapache.com/?s=301">here</a>.</p> </body></html>

302 Found

HTTP/1.1 302 Found Location: http://www.askapache.com/?s=302

<html><head><title>302 Found</title></head><body> <h1>Found</h1> <p>The document has moved <a href="http://www.askapache.com/?s=302">here</a>.</p> </body></html>

303 See Other

HTTP/1.1 303 See Other Location: http://www.askapache.com/?s=303

<html><head><title>303 See Other</title></head><body> <h1>See Other</h1> <p>The answer to your request is located <a href="http://www.askapache.com/?s=303">here</a>.</p> </body></html>

304 Not Modified

HTTP/1.1 304 Not Modified

305 Use Proxy

HTTP/1.1 305 Use Proxy Location: http://www.askapache.com/?s=305

<html><head><title>305 Use Proxy</title></head><body> <h1>Use Proxy</h1> <p>This resource is only accessible through the proxy http://www.askapache.com/?s=305<br /> You will need to configure your client to use that proxy.</p> </body></html>

306 unused

HTTP/1.1 306 unused Location: http://www.askapache.com/?s=306

<html><head><title>306 unused</title></head><body> <h1>unused</h1> <p>The server encountered an internal error or misconfigurationand was unable to complete your request.</p> <p>Please contact the server administrator, a@s.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.</p> <p>More information about this error may be available in the server error log.</p> </body></html>

307 Temporary Redirect

HTTP/1.1 307 Temporary Redirect Location: http://www.askapache.com/?s=307

<html><head><title>307 Temporary Redirect</title></head><body> <h1>Temporary Redirect</h1> <p>The document has moved <a href="http://www.askapache.com/?s=307">here</a>.</p> </body></html>

400 Bad Request

HTTP/1.1 400 Bad Request Connection: close

<html><head><title>400 Bad Request</title></head><body> <h1>Bad Request</h1> <p>Your browser sent a request that this server could not understand.</p> </body></html>

401 Authorization Required

HTTP/1.1 401 Authorization Required

<html><head><title>401 Authorization Required</title></head><body> <h1>Authorization Required</h1> <p>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.</p> <p>Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.</p> </body></html>

402 Payment Required

HTTP/1.1 402 Payment Required

<html><head><title>402 Payment Required</title></head><body> <h1>Payment Required</h1> <p>The server encountered an internal error or misconfigurationand was unable to complete your request.</p> <p>Please contact the server administrator, a@s.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.</p> <p>More information about this error may be available in the server error log.</p> </body></html>

403 Forbidden

HTTP/1.1 403 Forbidden

<html><head><title>403 Forbidden</title></head><body> <h1>Forbidden</h1> <p>You don't have permission to access /e/403 on this server.</p> <p>Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.</p> </body></html>

404 Not Found

HTTP/1.1 404 Not Found

<html><head><title>404 Not Found</title></head><body> <h1>Not Found</h1> <p>The requested URL /e/404 was not found on this server.</p> </body></html>

NOTE: You will most definately want to check out and use the Google 404 Error Page if you run WordPress. 405 Method Not Allowed

HTTP/1.1 405 Method Not Allowed Allow: TRACE

<html><head><title>405 Method Not Allowed</title></head><body> <h1>Method Not Allowed</h1> <p>The requested method GET is not allowed for the URL /e/405.</p> </body></html>

406 Not Acceptable

HTTP/1.1 406 Not Acceptable

<html><head><title>406 Not Acceptable</title></head><body> <h1>Not Acceptable</h1> <p>An appropriate representation of the requested resource /e/406 could not be found on this server.</p> </body></html>

407 Proxy Authentication Required

HTTP/1.1 407 Proxy Authentication Required

<html><head><title>407 Proxy Authentication Required</title></head><body> <h1>Proxy Authentication Required</h1> <p>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.</p> </body></html>

408 Request Time-out

HTTP/1.1 408 Request Time-out Connection: close

<html><head><title>408 Request Time-out</title></head><body> <h1>Request Time-out</h1> <p>Server timeout waiting for the HTTP request from the client.</p> </body></html>

409 Conflict

HTTP/1.1 409 Conflict

<html><head><title>409 Conflict</title></head><body> <h1>Conflict</h1> <p>The server encountered an internal error or misconfigurationand was unable to complete your request.</p> <p>Please contact the server administrator, a@s.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.</p> <p>More information about this error may be available in the server error log.</p> </body></html>

410 Gone

HTTP/1.1 410 Gone

<html><head><title>410 Gone</title></head><body> <h1>Gone</h1> <p>The requested resource<br />/e/410<br /> is no longer available on this server and there is no forwarding address. Please remove all references to this resource.</p> </body></html>

411 Length Required

HTTP/1.1 411 Length Required Connection: close

<html><head><title>411 Length Required</title></head><body> <h1>Length Required</h1> <p>A request of the requested method GET requires a valid Content-length.</p> </body></html>

412 Precondition Failed

HTTP/1.1 412 Precondition Failed

<html><head><title>412 Precondition Failed</title></head><body> <h1>Precondition Failed</h1> <p>The precondition on the request for the URL /e/412 evaluated to false.</p> </body></html>

413 Request Entity Too Large

HTTP/1.1 413 Request Entity Too Large Connection: close

<html><head><title>413 Request Entity Too Large</title></head><body> <h1>Request Entity Too Large</h1> The requested resource<br />/e/413<br /> does not allow request data with GET requests, or the amount of data provided in the request exceeds the capacity limit. </body></html>

414 Request-URI Too Large

HTTP/1.1 414 Request-URI Too Large Connection: close

<html><head><title>414 Request-URI Too Large</title></head><body> <h1>Request-URI Too Large</h1> <p>The requested URL's length exceeds the capacity limit for this server.</p> </body></html>

415 Unsupported Media Type

HTTP/1.1 415 Unsupported Media Type

<html><head><title>415 Unsupported Media Type</title></head><body> <h1>Unsupported Media Type</h1> <p>The supplied request data is not in a format acceptable for processing by this resource.</p> </body></html>

416 Requested Range Not Satisfiable

HTTP/1.1 416 Requested Range Not Satisfiable

417 Expectation Failed

HTTP/1.1 417 Expectation Failed

<html><head><title>417 Expectation Failed</title></head><body> <h1>Expectation Failed</h1> <p>The expectation given in the Expect request-header field could not be met by this server.</p> <p>The client sent<pre> Expect: </p></body></html>

418 I’m a teapot

HTTP/1.1 418 I'm a teapot

<html><head><title>418 I'm a teapot</title></head><body> <h1>I'm a teapot</h1> <p>Unfortunately this coffee machine is out of coffee.</p> </body></html>

419 unused

HTTP/1.1 419 unused

<html><head><title>419 unused</title></head><body> <h1>unused</h1> <p>The server encountered an internal error or misconfigurationand was unable to complete your request.</p> <p>Please contact the server administrator, a@s.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.</p> <p>More information about this error may be available in the server error log.</p> </body></html>

420 unused

HTTP/1.1 420 unused

<html><head><title>420 unused</title></head><body> <h1>unused</h1> <p>The server encountered an internal error or misconfigurationand was unable to complete your request.</p> <p>Please contact the server administrator, a@s.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.</p> <p>More information about this error may be available in the server error log.</p> </body></html>

421 unused

HTTP/1.1 421 unused

<html><head><title>421 unused</title></head><body> <h1>unused</h1> <p>The server encountered an internal error or misconfigurationand was unable to complete your request.</p> <p>Please contact the server administrator, a@s.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.</p> <p>More information about this error may be available in the server error log.</p> </body></html>

422 Unprocessable Entity

HTTP/1.1 422 Unprocessable Entity

<html><head><title>422 Unprocessable Entity</title></head><body> <h1>Unprocessable Entity</h1> <p>The server understands the media type of the request entity, but was unable to process the contained instructions.</p> </body></html>

423 Locked

HTTP/1.1 423 Locked

<html><head><title>423 Locked</title></head><body> <h1>Locked</h1> <p>The requested resource is currently locked. The lock must be released or proper identification given before the method can be applied.</p> </body></html>

424 Failed Dependency

HTTP/1.1 424 Failed Dependency

<html><head><title>424 Failed Dependency</title></head><body> <h1>Failed Dependency</h1> <p>The method could not be performed on the resource because the requested action depended on another action and that other action failed.</p> </body></html>

425 No code

HTTP/1.1 425 No code

<html><head><title>425 No code</title></head><body> <h1>No code</h1> <p>The server encountered an internal error or misconfigurationand was unable to complete your request.</p> <p>Please contact the server administrator, a@s.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.</p> <p>More information about this error may be available in the server error log.</p> </body></html>

426 Upgrade Required

HTTP/1.1 426 Upgrade Required

<html><head><title>426 Upgrade Required</title></head><body> <h1>Upgrade Required</h1> <p>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:// </p></body></html>

500 Internal Server Error

HTTP/1.1 500 Internal Server Error Connection: close

<html><head><title>500 Internal Server Error</title></head><body> <h1>Internal Server Error</h1> <p>The server encountered an internal error or misconfigurationand was unable to complete your request.</p> <p>Please contact the server administrator, a@s.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.</p> <p>More information about this error may be available in the server error log.</p> <p>Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.</p> </body></html>

501 Method Not Implemented

HTTP/1.1 501 Method Not Implemented Allow: TRACE Connection: close

<html><head><title>501 Method Not Implemented</title></head><body> <h1>Method Not Implemented</h1> <p>GET to /e/501 not supported.</p> </body></html>

502 Bad Gateway

HTTP/1.1 502 Bad Gateway X-Pad: avoid browser bug

<html><head><title>502 Bad Gateway</title></head><body> <h1>Bad Gateway</h1> <p>The proxy server received an invalid response from an upstream server.</p> </body></html>

503 Service Temporarily Unavailable

HTTP/1.1 503 Service Temporarily Unavailable Connection: close

<html><head><title>503 Service Temporarily Unavailable</title></head><body> <h1>Service Temporarily Unavailable</h1> <p>The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.</p> </body></html>

504 Gateway Time-out

HTTP/1.1 504 Gateway Time-out

<html><head><title>504 Gateway Time-out</title></head><body> <h1>Gateway Time-out</h1> <p>The proxy server did not receive a timely response from the upstream server.</p> </body></html>

505 HTTP Version Not Supported

HTTP/1.1 505 HTTP Version Not Supported

<html><head><title>505 HTTP Version Not Supported</title></head><body> <h1>HTTP Version Not Supported</h1> <p>The server encountered an internal error or misconfigurationand was unable to complete your request.</p> <p>Please contact the server administrator, a@s.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.</p> <p>More information about this error may be available in the server error log.</p> </body></html>

506 Variant Also Negotiates

HTTP/1.1 506 Variant Also Negotiates

<html><head><title>506 Variant Also Negotiates</title></head><body> <h1>Variant Also Negotiates</h1> <p>A variant for the requested resource <pre> /e/506 </pre> is itself a negotiable resource. This indicates a configuration error.</p> </body></html>

507 Insufficient Storage

HTTP/1.1 507 Insufficient Storage

<html><head><title>507 Insufficient Storage</title></head><body> <h1>Insufficient Storage</h1> <p>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.</p> </body></html>

508 unused

HTTP/1.1 508 unused

<html><head><title>508 unused</title></head><body> <h1>unused</h1> <p>The server encountered an internal error or misconfigurationand was unable to complete your request.</p> <p>Please contact the server administrator, a@s.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.</p> <p>More information about this error may be available in the server error log.</p> </body></html>

509 unused

HTTP/1.1 509 unused

<html><head><title>509 unused</title></head><body> <h1>unused</h1> <p>The server encountered an internal error or misconfigurationand was unable to complete your request.</p> <p>Please contact the server administrator, a@s.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.</p> <p>More information about this error may be available in the server error log.</p> </body></html>

510 Not Extended

HTTP/1.1 510 Not Extended X-Pad: avoid browser bug

<html><head><title>510 Not Extended</title></head><body> <h1>Not Extended</h1> <p>A mandatory extension policy in the request is not accepted by the server for this resource.</p> </body></html>

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

System Message: WARNING/2 (<string>, line 918); backlink

Inline emphasis start-string without end-string.

#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)) /* is the status code OK ?*/ #define ap_is_HTTP_SUCCESS(x) (((x) >= 200)&&((x) < 300)) /** is the status code a redirect / #define ap_is_HTTP_REDIRECT(x) (((x) >= 300)&&((x) < 400)) /* is the status code a error (client or server) / #define ap_is_HTTP_ERROR(x) (((x) >= 400)&&((x) < 600)) /* is the status code a client error / #define ap_is_HTTP_CLIENT_ERROR(x) (((x) >= 400)&&((x) < 500)) /* is the status code a server error / #define ap_is_HTTP_SERVER_ERROR(x) (((x) >= 500)&&((x) < 600)) /* is the status code a (potentially) valid response code? */ #define ap_is_HTTP_VALID_RESPONSE(x) (((x) >= 100)&&((x) < 600))

System Message: WARNING/2 (<string>, line 975); backlink

Inline emphasis start-string without end-string.

/** should the status code drop the connection */ #define ap_status_drops_connection(x) (((x) == HTTP_BAD_REQUEST) || ((x) == HTTP_REQUEST_TIME_OUT) || ((x) == HTTP_LENGTH_REQUIRED) || ((x) == HTTP_REQUEST_ENTITY_TOO_LARGE) || ((x) == HTTP_REQUEST_URI_TOO_LARGE) || ((x) == HTTP_INTERNAL_SERVER_ERROR) || ((x) == HTTP_SERVICE_UNAVAILABLE) || ((x) == HTTP_NOT_IMPLEMENTED))

System Message: WARNING/2 (<string>, line 990); backlink

Inline emphasis start-string without end-string.

HTTP_INFO

Is the status code (x) informational?

x >= 100 && x < 200

HTTP_SUCCESS

Is the status code (x) OK?

x >= 200 && x < 300

HTTP_REDIRECT

Is the status code (x) a redirect?

x >= 300 && x < 400

HTTP_ERROR

Is the status code (x) a error (client or server)?

x >= 400 && x < 600

HTTP_CLIENT_ERROR

Is the status code (x) a client error?

x >= 400 && x < 500

HTTP_SERVER_ERROR

Is the status code (x) a server error?

x >= 500 && x < 600

HTTP_VALID_RESPONSE

Is the status code (x) a (potentially) valid response code?

x >= 100 && x < 600

http_protocol.c

From http_protocol.c

static const char * status_lines[RESPONSE_CODES] = static const char * const status_lines[RESPONSE_CODES] = "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"

IANA HTTP Status Code Registry Value Description Reference 100 Continue [RFC2616], Section 10.1.1 101 Switching Protocols [RFC2616], Section 10.1.2 102 Processing [RFC2518], Section 10.1 200 OK [RFC2616], Section 10.2.1 201 Created [RFC2616], Section 10.2.2 202 Accepted [RFC2616], Section 10.2.3 203 Non-Authoritative Information [RFC2616], Section 10.2.4 204 No Content [RFC2616], Section 10.2.5 205 Reset Content [RFC2616], Section 10.2.6 206 Partial Content [RFC2616], Section 10.2.7 207 Multi-Status [RFC4918], Section 11.1 226 IM Used [RFC3229], Section 10.4.1 300 Multiple Choices [RFC2616], Section 10.3.1 301 Moved Permanently [RFC2616], Section 10.3.2 302 Found [RFC2616], Section 10.3.3 303 See Other [RFC2616], Section 10.3.4 304 Not Modified [RFC2616], Section 10.3.5 305 Use Proxy [RFC2616], Section 10.3.6 306 (Reserved) [RFC2616], Section 10.3.7 307 Temporary Redirect [RFC2616], Section 10.3.8 400 Bad Request [RFC2616], Section 10.4.1 401 Unauthorized [RFC2616], Section 10.4.2 402 Payment Required [RFC2616], Section 10.4.3 403 Forbidden [RFC2616], Section 10.4.4 404 Not Found [RFC2616], Section 10.4.5 405 Method Not Allowed [RFC2616], Section 10.4.6 406 Not Acceptable [RFC2616], Section 10.4.7 407 Proxy Authentication Required [RFC2616], Section 10.4.8 408 Request Timeout [RFC2616], Section 10.4.9 409 Conflict [RFC2616], Section 10.4.10 410 Gone [RFC2616], Section 10.4.11 411 Length Required [RFC2616], Section 10.4.12 412 Precondition Failed [RFC2616], Section 10.4.13 413 Request Entity Too Large [RFC2616], Section 10.4.14 414 Request-URI Too Long [RFC2616], Section 10.4.15 415 Unsupported Media Type [RFC2616], Section 10.4.16 416 Requested Range Not Satisfiable [RFC2616], Section 10.4.17 417 Expectation Failed [RFC2616], Section 10.4.18 422 Unprocessable Entity [RFC4918], Section 11.2 423 Locked [RFC4918], Section 11.3 424 Failed Dependency [RFC4918], Section 11.4 426 Upgrade Required [RFC2817], Section 6 500 Internal Server Error [RFC2616], Section 10.5.1 501 Not Implemented [RFC2616], Section 10.5.2 502 Bad Gateway [RFC2616], Section 10.5.3 503 Service Unavailable [RFC2616], Section 10.5.4 504 Gateway Timeout [RFC2616], Section 10.5.5 505 HTTP Version Not Supported [RFC2616], Section 10.5.6 506 Variant Also Negotiates [RFC2295], Section 8.1 507 Insufficient Storage [RFC4918], Section 11.5 510 Not Extended [RFC2774], Section 7 Helpful HTTP Links

  1. IANA registry
  2. Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0)
  3. Adobe Flash status code definitions (ie 408)
  4. Microsoft Internet Information Server Status Codes and Sub-Codes
  5. httplint
  6. HTTP Headers, brief intro.
  7. Common User-Agent Issues
  8. [RFC2295] Holtman, K. and A.H. Mutz, "Transparent Content Negotiation in HTTP", RFC 2295, March 1998.
  9. [RFC2518] Goland, Y., Whitehead, E., Faizi, A., Carter, S.R., and D. Jensen, "HTTP Extensions for Distributed Authoring -- WEBDAV", RFC 2518, February 1999.

System Message: WARNING/2 (<string>, line 1171)

Block quote ends without a blank line; unexpected unindent.
  1. [RFC2616] Fielding, R., Gettys, J., Mogul, J., Frystyk, H., Masinter, L., Leach, P., and T. Berners-Lee, "Hypertext Transfer Protocol -- HTTP/1.1", RFC 2616, June 1999.
  2. [RFC2774] Nielsen, H., Leach, P., and S. Lawrence, "An HTTP Extension Framework", RFC 2774, February 2000.
  3. [RFC2817] Khare, R. and S. Lawrence, "Upgrading to TLS Within HTTP/1.1", RFC 2817, May 2000.
  4. [RFC3229] Mogul, J., Krishnamurthy, B., Douglis, F., Feldmann, A., Goland, Y., van Hoff, A., and D. Hellerstein, "Delta encoding in HTTP", RFC 3229, January 2002.
  5. [RFC4918] Dusseault, L., Ed., "HTTP Extensions for Web Distributed Authoring and Versioning (WebDAV)", RFC 4918, June 2007.