ブラウザなどで404や403など表示される、あれの一覧です。
尚、エラーコードは400番・500番なので100〜300番台は普通見られません。
あまり詳しくないので間違っていたらごめんなさい。(詳しく知りたい人は検索サイトで「HTTPステータスコード」と書けばたくさん出ます。) 具体例があれば、リクエストとレスポンスを掲示します。
要求を継続するときに使われます。大量のデータを送信するとき、データが受け取ってもらえるかどうか確認するときなどに使います。 具体例は、http://sunpillar2004.hp.infoseek.co.jp/cgi-bin/info/info2.cgiにアクセスしたときのものです(Expect: 100-continue がみそ)。
POST /cgi-bin/info/info2.cgi HTTP/1.1 Host: sunpillar2004.hp.infoseek.co.jp Expect: 100-continue Content-Type: application/x-www-form-urlencoded Connection: close Content-Length: 1234567890
HTTP/1.1 100 Continue
プロトコルを変えるときに使われます。具体例は発見できませんでした。
GET / HTTP/1.1 Host: foo.example Upgrade: TLS/1.0 Connection: Upgrade
HTTP/1.1 101 Switching Protocols Date: Sat, 01 Jan 2000 00:00:00 GMT Upgrade: TLS/1.0, HTTP/1.1 Connection: Upgrade
処理に時間がかかって応答を返すのが遅いときに、タイムアウトになるのを阻止するために返します。具体例は見つけられませんでした。WebDAVのステータスコード。
?
?
要求に対する応答がきちんと行われたときに出ます。具体例は、スラッシュドット ジャパンへアクセスしたときのものです。
GET / HTTP/1.1 Host: slashdot.jp Connection: close
HTTP/1.1 200 OK Date: Sun, 09 Apr 2006 15:24:27 GMT Server: Apache/1.3.33 (Debian GNU/Linux) mod_perl/1.29 SLASH_LOG_DATA: shtml X-Powered-By: Slash 2.003000 X-Bender: My full name is Bender Bending Rodriguez. Connection: close Content-Type: text/html; charset=utf-8
メゾットがPUTのとき、要求によってオブジェクトが作成された場合になります。具体例は見つけられませんでした。(自前でApacheサーバー立てれば見えるでしょうけど)
PUT /example.dat HTTP/1.1 Host: www.foo.example Connection: close Content-Type: application/x-www-form-urlencoded Content-Length: 15 This+is+a+test.
HTTP/1.1 201 Created Date: Sat, 01 Jan 2000 00:00:00 GMT Connection: close Location: http://www.foo.example/example.dat
メゾットがPUTのとき、サーバーが要求を受けたが処理するか否かを決めていないときになります。バッチ処理などあとで生成するときなどに返します。具体例は見つけられませんでした。
PUT /example.dat HTTP/1.1 Host: www.foo.example Connection: close Content-Type: application/x-www-form-urlencoded Content-Length: 15 This+is+a+test.
HTTP/1.1 202 Accepted Date: Sat, 01 Jan 2000 00:00:00 GMT Connction: close Location: http://www.foo.example/
この情報はあまり信頼できないというときになります。プロキシなどが返すものです。具体例は見つけられませんでした。
GET http://www.foo.example/ HTTP/1.1 Host: www.foo.example Connection: close
HTTP/1.1 203 Non-Authoritative Information Date: Sat, 01 Jan 2000 00:00:00 GMT Connection: close Content-Type: text/html; charset=utf-8
要求を受け取ったが返す情報がないときになります。データ送信後に、表示を変えないときに使われる。具体例は自作CGIで生成したものです。
POST /test/test.cgi HTTP/1.1 Host: sunpillar.jf.land.to Connection: close Content-Type: application/x-www-form-urlencoded Content-Length: 15 This+is+a+test.
HTTP/1.1 204 No Content Date: Mon, 10 Apr 2006 01:03:56 GMT Server: Apache X-Powered-By: ModLayout/3.2 Cache-Control: no-cache Connection: close Content-Type: text/html
要求によって変わった情報を元に戻します。フォーム送信後フォームを初期状態に戻すときなどに使います。具体例は自作CGIで生成したものです。
POST /test/test.cgi HTTP/1.1 Host: sunpillar.jf.land.to Connection: close Content-Type: application/x-www-form-urlencoded Content-Length: 15 This+is+a+test.
HTTP/1.1 205 Reset Content Date: Mon, 10 Apr 2006 01:07:46 GMT Server: Apache X-Powered-By: ModLayout/3.2 Cache-Control: no-cache Connection: close Transfer-Encoding: chunked Content-Type: text/html
部分的GETを受け取ったときになります。具体例は、2ちゃんねる内のあるスレのdatファイルの1000バイト目から2000バイト目までを取得したときのものです。
GET /sec2ch/dat/1045495883.dat HTTP/1.1 Host: qb5.2ch.net Connection: close User-Agent: Monazilla/1.0 (Windows XP) Range: bytes=1000-2000
HTTP/1.1 206 Partial Content Date: Sun, 09 Apr 2006 14:15:56 GMT Server: Apache/2.0.52 (Unix) PHP/4.3.10 mod_ssl/2.0.52 OpenSSL/0.9.7c-p1 Last-Modified: Sun, 02 Apr 2006 07:36:22 GMT ETag: "114d35-23673-bb052980" Accept-Ranges: bytes Content-Length: 1001 Vary: Accept-Encoding Content-Range: bytes 1000-2000/145011 Connection: close Content-Type: text/plain
複数のステータスコードを返すときに返す。WebDAVのステータスコード。具体例が見つかりませんでした。
?
?
?。Delta encoding in HTTPで定義されている。具体例が見つかりませんでした。
?
?
複数のページの利用が可能な場合になります。具体例は、W3Cのhttp://www.w3.org/TR/xhtml11/DTD/xhtml11.html
GET /TR/xhtml11/DTD/xhtml11.html HTTP/1.1 Host: www.w3.org Connection: close
HTTP/1.1 300 Multiple Choices Date: Sun, 09 Apr 2006 15:16:06 GMT Server: Apache/1.3.33 (Unix) PHP/4.3.10 Connection: close Transfer-Encoding: chunked Content-Type: text/html; charset=iso-8859-1
ページが他の場所に移ったときになります。「永久に」とあるので元のアドレスにページが戻ることはありません。 具体例は本館裏技室のURL(http://sunpillar.jf.land.to/urawaza/)の最後の/を入れなかったものを指定した場合です。ブラウザでは正常に表示されますが、リダイレクトが発生するので無駄が発生します。ディレクトリの最後は/で締めましょう。
GET /urawaza HTTP/1.1 Host: sunpillar.jf.land.to Connection: close
HTTP/1.1 301 Moved Permanently Date: Sun, 09 Apr 2006 15:39:09 GMT Server: Apache Location: http://sunpillar.jf.land.to/urawaza/ Connection: close Transfer-Encoding: chunked Content-Type: text/html; charset=iso-8859-1
Moved Temporarilyとも。本来は、ページが一時的に移動したときになります。が汎用的なページ移動に使われています。
本来の使い方っぽい具体例は、2ちゃんねるでアクセス過多状態のときにスレを見ようとしたときです。人大杉のページへリダイレクトされます。
GET /test/read.cgi/download/1144164389/l50 HTTP/1.1 Host: tmp6.2ch.net Connection: close
HTTP/1.1 302 Found Date: Sun, 09 Apr 2006 15:58:12 GMT Server: Apache/2.0.54 (Unix) PHP/4.4.0 mod_ssl/2.0.54 OpenSSL/0.9.7d Location: http://www2.2ch.net/live.html Vary: Accept-Encoding Connection: close Content-Type: text/html; charset=iso-8859-1 X-Pad: avoid browser bug
「他のURLを参照して下さい。」という意味。掲示板等でデータ送信後に元のページへ戻るときなどに使います。具体例は自作CGIで生成したものです。
POST /test/test.cgi HTTP/1.1 Host: sunpillar.jf.land.to Connection: close Content-Type: application/x-www-form-urlencoded Content-Length: 15 This+is+a+test.
HTTP/1.1 303 See Other Date: Mon, 10 Apr 2006 01:13:29 GMT Server: Apache X-Powered-By: ModLayout/3.2 Location: http://www.google.co.jp/ Cache-Control: no-cache Connection: close Transfer-Encoding: chunked Content-Type: text/html
ブラウザが前にキャッシュした内容と変わらないので改めてページを取り込む必要がないとき返します。具体例は、本館のロゴ画像を取得したときのものです。
GET /e/logo/logo_04.gif HTTP/1.1 Host: sunpillar.jf.land.to Connection: close If-Modified-Since: Sun, 26 Mar 2006 15:28:35 GMT
HTTP/1.1 304 Not Modified Date: Mon, 10 Apr 2006 00:32:49 GMT Server: Apache Connection: close ETag: "75913c-a9a-4426b323"
プロキシ経由でないとダメという場合になる。具体例は見つけられませんでした。
GET /example/test.html HTTP/1.1 Host: foo.example Connection: close
HTTP/1.1 305 Use Proxy Date: Sat, 01 Jan 2000 00:00:00 GMT Connection: close Location: http://proxy.example/
以前のバージョンで使われていましたが現在は予約されています(欠番)。Switch Proxyだったという情報を見つけました。
ページが一時的に他のアドレスに属するときになります。302と同じ意味ですが、302の間違った使い方が横行していたため新設。具体例は見つけられませんでした。
GET /image.php?e78yt398ehqbofahio HTTP/1.1 Host: foo.example Connection: close
HTTP/1.1 307 Temporary Redirect Date: Sat, 01 Jan 2000 00:00:00 GMT Location: http://foo.example/503.html Connection: close Content-Type: text/html; charset=iso-8859-1
正しくないリクエストを行ったときになります(末尾に../をつけるとなる場合がある)。具体例は、HTTP/1.1なのにHost:をつけなかった場合のものです。(サーバーはlivedoor.co.jp)
GET / HTTP/1.1 Connection: close
HTTP/1.1 400 Bad Request Date: Mon, 10 Apr 2006 01:45:33 GMT Server: Apache/1.3.33 (Unix) Connection: close Transfer-Encoding: chunked Content-Type: text/html; charset=iso-8859-1
認証に失敗したときになります。ブラウザで認証画面が出るとき、実は一度401が返されています。具体例は、ルーターの管理画面を呼び出すときのものです。
GET / HTTP/1.1 Host: 192.168.0.1 Connection: close
HTTP/1.0 401 Unauthorized Server: AtermWARPSTAR/1.0.0 WWW-Authenticate: Basic realm="WARPSTAR" Content-Type: text/html; charset=Shift_JIS Pragma: no-cache Cache-Control: no-cache Content-Length: 891
将来のために予約されています。(有料サイトに接続しようとしたがお金が支払われていないときに出る?)
ページがない、ページを閲覧禁止にしている、アクセス権限がないときになります。404と同じぐらい良く見る。
具体例:http://www.mc.ccnw.ne.jp/
GET / HTTP/1.1 Host: www.mc.ccnw.ne.jp Connection: close
HTTP/1.1 403 Forbidden Date: Mon, 10 Apr 2006 02:02:03 GMT Server: Apache/1.3.34 (Unix) Connection: close Transfer-Encoding: chunked Content-Type: text/html; charset=iso-8859-1
ページが見つからないときになります。一番良く見るエラー。
具体例:http://www.mc.ccnw.ne.jp/sunpillar/index44.html
GET /sunpillar/index44.html HTTP/1.1 Host: www.mc.ccnw.ne.jp Connection: close
HTTP/1.1 404 Not Found Date: Mon, 10 Apr 2006 02:09:47 GMT Server: Apache/1.3.34 (Unix) Connection: close Transfer-Encoding: chunked Content-Type: text/html; charset=iso-8859-1
許可されて無いメゾットを使用したときに発生。たとえば、POSTが許されていないサーバーでPOSTを使用すると発生します。具体例は、http://www.mc.ccnw.ne.jp/にPOSTした時のものです。
POST /sunpillar/index.html HTTP/1.1 Host: www.mc.ccnw.ne.jp Connection: close Content-Type: application/x-www-form-urlencoded Content-Length: 15 This+is+a+test.
HTTP/1.1 405 Method Not Allowed Date: Mon, 10 Apr 2006 14:10:50 GMT Server: Apache/1.3.34 (Unix) Allow: GET, HEAD, OPTIONS, TRACE Connection: close Transfer-Encoding: chunked Content-Type: text/html; charset=iso-8859-1
たとえば、言語が合わないときなどになります。具体例は、英語か日本語用のページしか作られていないのに、中国語(台湾)で要求した場合です。
GET /test/ HTTP/1.1 Host: sunpillar.jf.land.to Connection: close Accept: zh-tw
HTTP/1.1 406 Not Acceptable Date: Sun, 09 Apr 2006 15:12:19 GMT Server: Apache Connection: close Transfer-Encoding: chunked Content-Type: text/html; charset=iso-8859-1
プロキシの認証がされていないときになる。具体例は見つけられませんでした。
?
?
リクエストがタイムアウトになったときになる。(実際に見たことはありません。)
?
?
リソースの現在の状態とリクエストの間にに矛盾が発生したときになります。具体例は見つけられませんでした。
?
?
ページが今後復活する可能性が全くないときになります。404 Not Foundよりも強い意味で永久に削除されたときに使います。具体例は見つけられませんでした。
GET /test.html HTTP/1.1 Host: foo.example Connection: close
HTTP/1.1 410 Gone Date: Sat, 01 Jan 2000 00:00:00 GMT Connection: close Content-Type: text/html; charset=iso-8859-1
Content-Lengthが必要なのにリクエストに入っていないときになります。具体例は見つかりませんでした。
POST /cgi-bin/test/test.cgi HTTP/1.1 Host: foo.example Content-Type: application/x-www-form-urlencoded Connection: close
HTTP/1.1 411 Length Required Date: Sat, 01 Jan 2000 00:00:00 GMT Connection: close Content-Type: text/html; charset=iso-8859-1
リクエストが前提条件に合わないときになる。例えば、If-Unmodified-Since: に記述した時刻以降に更新があった場合に発生します。具体例は本館トップページを取得するときに「If-Unmodified-Since: Sun, 08 Jan 1989 09:00:00 GMT」でリクエストしたものです。
GET / HTTP/1.1 Host: sunpillar.jf.land.to Connection: close If-Unmodified-Since: Sun, 08 Jan 1989 09:00:00 GMT
HTTP/1.1 412 Precondition Failed Date: Tue, 11 Apr 2006 07:40:25 GMT Server: Apache Connection: close Content-Type: text/html; charset=iso-8859-1
リクエストの大きさが大きすぎるときになります。アップローダーで上限以上のファイルを送ろうとした場合などに発生します。具体例は見つかりませんでした。
POST /uploader/upload.cgi HTTP/1.1 Host: foo.example Connection: close Referer: http://foo.example/uploader/ Content-Type: multipart/form-data; boundary=---------------------------asfyaiujepaoifjho Content-Length: 4294967295 ---------------------------asfyaiujepaoifjho Content-Disposition: form-data; name="upfile"; filename="example.avi" Content-Type: video/x-msvideo ・・・ ---------------------------asfyaiujepaoifjho Content-Disposition: form-data; name="pass" 1234567890 -----------------------------23281168279961 Content-Disposition: form-data; name="comment" kari -----------------------------23281168279961--
HTTP/1.1 413 Request Entity Too Large Date: Sat, 01 Jan 2000 00:00:00 GMT Connection: close Content-Type: text/html; charset=iso-8859-1
URLが長すぎるときになります。
GET /cgi-bin/info/info.cgi?test --- 10kB分 --- test HTTP/1.1 Host: sunpillar2004.hp.infoseek.co.jp Connection: close
HTTP/1.1 414 Request-URI Too Large Date: Tue, 11 Apr 2006 12:06:29 GMT Sssver: Apachee Connection: close Content-Type: text/html; charset=iso-8859-1
サポートしていないメディアタイプをだったときになります。例えば、multipart/form-dataで送るべきところをapplication/x-www-form-urlencodedで送ろうとするとなります。具体例は見つかりませんでした。
GET /cgi-bin/bbs.cgi HTTP/1.1 Host: foo.example Connection: close Content-Type: text/plain Content-Length: 18 これはテストです。
HTTP/1.1 415 Unsupported Media Type Date: Sat, 01 Jan 2000 00:00:00 GMT Connection: close Content-Type: text/html; charset=iso-8859-1
リクエストがリソースのある範囲の前や後ろをリクエストしたときになります。Range: で指定を誤ったときになります。具体例では「アナログ放送終了までのカウントダウン」のFlash(5813B)の10000B以降を取得しようとしたときのものです。
GET /flash/swf/tvanalogcountdown.swf HTTP/1.1 Host: sunpillar2004.hp.infoseek.co.jp Connection: close Range: bytes=10000-
HTTP/1.1 416 Requested Range Not Satisfiable Date: Tue, 11 Apr 2006 12:43:45 GMT Server: Apache Last-Modified: Sun, 12 Feb 2006 03:05:20 GMT ETag: "2d003c0-16b5-43eea5f0" Accept-Ranges: bytes Content-Length: 5813 Content-Range: bytes */5813 Connection: close Content-Type: application/x-shockwave-flash
Expectリクエストヘッダフィールド拡張が受け入れられなかったときになります。具体例は、「Expect: 777-continue」という妙なリクエストをしたときのものです。
POST /cgi-bin/info/info2.cgi HTTP/1.1 Host: sunpillar2004.hp.infoseek.co.jp Expect: 777-continue Connection: close Content-Length: 10
HTTP/1.1 417 Expectation Failed Date: Tue, 11 Apr 2006 12:51:51 GMT Server: Apache Connection: close Transfer-Encoding: chunked Content-Type: text/html; charset=iso-8859-1
HTCPCP/1.0[RFC 2324]で定義されてます。ティーポットでコーヒーを作ろうとしたときに返します。具体例は見つかりませんでした…って実装例あるのか?
GET /make.cof HTCPCP/1.0 Host: teapot.foo.example Accept-Additions: Cream, Vanilla Connection: close
HTCPCP/1.0 418 I'm a teapot Date: Sat, 01 Jan 2000 00:00:00 GMT Server: Teapot(MADE IN JAPAN) Connection: close Content-Type: text/html; charset=iso-8859-1
WebDAVで使われるコード。リクエストの実体の内容は理解できるし、リクエストも妥当だが処理できない場合に返します。具体例は見つかりませんでした。
?
?
WebDAVで使われるコード。リクエストしたリソースがロックされていたときに返します。具体例は見つかりませんでした。
?
?
WebDAVで使われるコード。リクエストが依存する他の動作が失敗したことで、リクエスト自体も失敗したときに返します。具体例は見つかりませんでした。
?
?
Upgrading to TLS Within HTTP/1.1で使われるコード。サーバーがプロトコルのバージョンをアップグレードすることを要求するときに返します。具体例は見つかりませんでした。
?
?
たとえば、CGIに何らかの不具合が発生したときになります。具体例は見つかりませんでした。
GET /test.cgi HTTP/1.1 Host: foo.example Connection: close
HTTP/1.1 500 Internal Server Error Date: Sat, 01 Jan 2000 00:00:00 GMT Connection: close Content-Type: text/html; charset=iso-8859-1
実行しようとしても、それを行う機能がないときに起きます。
?
?
プロキシーやゲートウェイがリクエスト先サーバーから不正な応答を受けたときになります。具体例は、2ちゃんねるのlive22x.2ch.net(実況系サーバー)がトラブルを起こしたときに返したものです。分散処理をしているのが原因?
GET /news/ HTTP/1.1 Host: live22x.2ch.net User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; ja; rv:1.8.0.2) Gecko/20060308 Firefox/1.5.0.2 Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 Accept-Language: ja,en-us;q=0.7,en;q=0.3 Accept-Encoding: gzip,deflate Accept-Charset: Shift_JIS,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Connection: keep-alive Cookie: (内緒)
HTTP/1.1 502 Bad Gateway Date: Tue, 18 Apr 2006 15:36:04 GMT Content-Length: 232 Keep-Alive: timeout=1, max=100 Connection: Keep-Alive Content-Type: text/html; charset=iso-8859-1
サーバーにアクセスが殺到しているときになります。
例えば、大規模なサイト(インフォシーク・ヤフーなど)のトップニュース関連としてリンクされているホームページ、
特に、有名人や大企業のスキャンダルならいろいろな掲示板からもリンクされるので可能性が高まります。
ただ、ここのホームページのようにフリーのホームページの場合削除される可能性が高いと思いますが。
GET / HTTP/1.1 Host: foo.example Connection: close
HTTP/1.1 503 Service Unavailable Date: Sat, 01 Jan 2000 00:00:00 GMT Content-Language: en Retry-After: 120 Connection: close Content-Type: text/html; charset=iso-8859-1
プロキシーがリクエスト先のサーバーから応答が無くてタイムアウトしたときになります。
?
?
サーバーがサポートしていないバージョンのリクエストをしたときになります。具体例は見つかりませんでした。
?
?
?。具体例は見つかりませんでした。
?
?
WebDAVで使われるコード。サーバーのストレージの容量不足?
?
?
?。具体例は見つかりませんでした。
?
?
2006年04月13日更新