Test page of HTTP Status code

Abstract

When testing/developing a software, you may need a Web server that returns particular HTTP status code in HTTP header.

This site provides any HTTP status codes for testing.

How to use

Just access below URL:

http://ozuma.sakura.ne.jp/httpstatus/[http_status_code]

fill in [http_status_code] with HTTP status code you need.

For example, http://ozuma.sakura.ne.jp/httpstatus/503 returns a header "503 Service Unavailable". All responses have empty body.

HTTP/1.1 503 Service Unavailable
Date: Sun, 22 Apr 2012 10:36:08 GMT
Server: Apache/1.3.42 (Unix) mod_ssl/2.8.31 OpenSSL/0.9.8e
Connection: close
Transfer-Encoding: chunked
Content-Type: text/html; charset=utf-8

When you access a code which isn't shown below "Table of codes", it returns "404 Not Found". (e.g. http://ozuma.sakura.ne.jp/httpstatus/234 )

Table of codes

Almost status codes are defined RFC 2616.

100Continue
101Switching Protocols
102Processing (RFC 2518)
200OK
201Created
202Accepted
203Non-Authoritative Information
204No Content
205Reset Content
206Partial Content
207Multi-Status (RFC 4918)
208Already Reported (RFC 5842)
226IM Used (RFC 3229)
300Multiple Choices
301Moved Permanently
302Found
303See Other
304Not Modified
305Use Proxy
306Switch Proxy
307Temporary Redirect
308Permanent Redirect (draft)
400Bad Request
401Unauthorized
402Payment Required
403Forbidden
404Not Found
405Method Not Allowed
406Not Acceptable
407Proxy Authentication Required
408Request Timeout
409Conflict
410Gone
411Length Required
412Precondition Failed
413Request Entity Too Large
414Request-URI Too Long
415Unsupported Media Type
416Requested Range Not Satisfiable
417Expectation Failed
418I'm a teapot (RFC 2324)
422Unprocessable Entity (RFC 4918)
423Locked (RFC 4918)
424Failed Dependency (RFC 4918)
426Upgrade Required (RFC 2817)
428Precondition Required (draft)
429Too Many Requests (draft)
431Request Header Fields Too Large (draft)
500Internal Server Error
501Not Implemented
502Bad Gateway
503Service Unavailable
504Gateway Timeout
505HTTP Version Not Supported
506Variant Also Negotiates (RFC 2295)
507Insufficient Storage (RFC 4918)
508Loop Detected (RFC 5842)
510Not Extended (RFC 2774)
511Network Authentication Required (draft)

Source code

Check my GitHub account.

About

I’m a Web/Network engineer, live in Tokyo, Japan. My nickname is "ozuma".