511

状態符号 511 (HTTP)

[4] 511 (Network Authentication Required) は、ネットワークの利用のための認証が必要なことを表す状態符号です。

仕様書

意味

[5] 511 は、クライアントがネットワークアクセスを得るために認証が必要なことを示します >>1。

[12] 511 は、 captive portal が (サーバーからの応答を期待する) クライアントに害を及ぼす問題を軽減するためのものです >>1。 captive portal を推奨するものではありません >>1。

構文

[6] 応答の表現は、利用者が credentials を提出できるような資源 (例えば HTML のフォーム) へのリンクを含むべきです >>1。

[7] 511 応答自体は challenge やログインのインターフェイスを含むべきではありません >>1。

[8] ブラウザーの表示上、ログインが元々要求された URL に属することになってしまうからです >>1。

文脈

[10] プロキシが、ネットワークアクセスを制御する方法として使うことができます >>1。

[9] 起源サーバーは、 511 を生成するべきではありません >>1。

[15] HTTPS では、 (MITM proxy を除き) 原理的に 511 は使えません。

処理

[11] キャッシュ可能ではありません >>1。

[13] 511 は比較的新しい状態符号なので、 Webブラウザーは特別扱いしていないかもしれません。 511 応答は明らかに起源サーバーが返す応答ではないので、 407 応答同様、応答のスクリプトが要求URL と同じ起源のデータにアクセスできないような配慮が必要かもしれません。

[14] 逆に本来の起源サーバーから提供されたスクリプトも、 511 応答にアクセスできるべきではなさそうです。 (イントラネットの情報が流出してしまい、プライバシーの問題ともなります。)

メモ

[2] List of HTTP status codes - Wikipedia, the free encyclopedia ( ( 版)) <http://en.wikipedia.org/wiki/List_of_HTTP_status_codes#511>

[3] 728658 – (http-511) Handle HTTP error 511 Network Authentication Required (RFC 6585: standard secure proxy authentification/captive portal detection) ( 版) <https://bugzilla.mozilla.org/show_bug.cgi?id=728658>

[16] 728658 – (http-511) Handle HTTP error 511 Network Authentication Required (RFC 6585: standard secure proxy authentification/captive portal detection) ( ()) <https://bugzilla.mozilla.org/show_bug.cgi?id=728658>

[17] 728658 – (http-511) Handle HTTP error 511 Network Authentication Required (RFC 6585: standard secure proxy authentification/captive portal detection) ( ()) <https://bugzilla.mozilla.org/show_bug.cgi?id=728658#c19>

511 impacts a browser like Mozilla in a couple of ways --

* It shouldn't cache .favicons that have a 511

* It should consider a feed that returns 511 as temporarily unavailable, not corrupt (or authoritative)

* It should retry automated downloads (like updates) later if receiving a 511