【 この訳では、 この仕様が公表された当時の~HTTP仕様( `RFC2616$r )を参照している箇所を, 現在の中核~HTTP仕様~内の`等価な記述を指すよう改めている@~HTTPcommon#_terms-convention$。 】
1. 序論
この文書は、 様々な共通的な状況~用に, 追加的な~HTTP`状態s~code$を指定する【![RFC2616]】 — 相互運用能を改善するため, および より精確でない他の状態s~codeが利用されるときとの混同を避けるため。 ◎ This document specifies additional HTTP [RFC2616] status codes for a variety of common situations, to improve interoperability and avoid confusion when other, less precise status codes are used.
これらの状態s~codeは任意選択~であり、 `~server$には,~supportは要求されないことに注意。 しかしながら、 `~client$は[ 未知な状態s~codeを同じ~classに属する汎用な~errorとして扱う ]ことになるので, より安全に既存の~serverに配備できる (~~詳細は、 `HTTP^r `状態s~code@~HTTPsem#status.codes§を見よ)。 ◎ Note that these status codes are optional; servers cannot be required to support them. However, because clients will treat unknown status codes as a generic error of the same class (e.g., 499 is treated as 400 if it is not recognized), they can be safely deployed by existing servers (see [RFC2616] Section 6.1.1 for more information).
2. 要件
この文書~内の~keyword "MUST" … 【以下、この段落の内容は`~IETF日本語訳 共通~page@~IETFcommon#requirements-notation$に移譲。】 ◎ The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC2119].
3. `428^st
状態s~code `428^st0 は、 次を指示する ⇒ `生成元~server$は、 `条件付き要請$を要求している。 ◎ The 428 status code indicates that the origin server requires the request to be conditional.
その代表的な利用は、 “`更新喪失$” 問題を避けることにある — そこでは、[ `~client$が`資源$の状態を `GET$m して, それを改変してから, `~server$へ `PUT$m し戻している間 ]に[ ある第三者-主体が~server上の状態を改変した場合 ]に,競合に導かれる。 条件付き要請を要求することにより、 ~serverは[ ~clientが,正しい複製~上で作業している ]ことを確約できる。 ◎ Its typical use is to avoid the "lost update" problem, where a client GETs a resource's state, modifies it, and PUTs it back to the server, when meanwhile a third party has modified the state on the server, leading to a conflict. By requiring requests to be conditional, the server can assure that clients are working with the correct copies.
この状態s~codeを利用している応答は、 要請を成功裡に提出し直す方法を説明するベキである。 例えば: ◎ Responses using this status code SHOULD explain how to resubmit the request successfully. For example:
HTTP/1.1 428 Precondition Required
Content-Type: text/html
状態s~code `428^st0 を伴う応答は、 ~cacheに格納されてはナラナイ。 ◎ Responses with the 428 status code MUST NOT be stored by a cache.
4. `429^st
状態s~code `429^st0 は、 次を指示する ⇒ 利用者は、 ある所与の時間~内に多過ぎる要請を送信した( “~rate制限-法” )。 ◎ The 429 status code indicates that the user has sent too many requests in a given amount of time ("rate limiting").
応答の`表現$は、 当の条件を説明している詳細を内包するベキである — 加えて、 `Retry-After$h ~headerを内包して, 新たな要請を為すまで待機する必要がある~~時間を指示してもヨイ。 ◎ The response representations SHOULD include details explaining the condition, and MAY include a Retry-After header indicating how long to wait before making a new request.
例えば: ◎ For example:
HTTP/1.1 429 Too Many Requests
Content-Type: text/html
Retry-After: 3600
この仕様は、[ `生成元~server$が利用者を識別する方法, 要請を数える方法 ]を何も定義しないことに注意。 例えば,要請~rateを制限している生成元~serverは、 `資源$ごとに[ ~server全体, あるいは~serverの集合 ]にわたる要請の個数に基づいて,それを行い得る。 同様に、[ 認証用の`資格証$/~statefulな~cookie ]により,利用者を識別するかもしれない。 ◎ Note that this specification does not define how the origin server identifies the user, nor how it counts requests. For example, an origin server that is limiting request rates can do so based upon counts of requests on a per-resource basis, across the entire server, or even among a set of servers. Likewise, it might identify the user by its authentication credentials, or a stateful cookie.
状態s~code `429^st0 を伴う応答は、 ~cacheに格納されてはナラナイ。 ◎ Responses with the 429 status code MUST NOT be stored by a cache.
5. `431^st
状態s~code `431^st0 は、 次を指示する ⇒ ~serverは、 要請の`~header$(たち)が巨大~過ぎるので,要請を処理する用意がない。 ◎ The 431 status code indicates that the server is unwilling to process the request because its header fields are too large.\
要請は、 ~headerの~sizeを抑制してから提出し直してもヨイ。 ◎ The request MAY be resubmitted after reducing the size of the request header fields.
この状態s~codeは、[ 一連の要請~headerの総計が巨大~過ぎる場合, 単独の~headerが巨大~過ぎる場合 ]どちらにも利用できる。 後者の事例においては、 応答を成す表現は,どの~headerが巨大~過ぎるかを指定するベキである。 ◎ It can be used both when the set of request header fields in total is too large, and when a single header field is at fault. In the latter case, the response representation SHOULD specify which header field was too large.
例えば: ◎ For example:
HTTP/1.1 431 Request Header Fields Too Large
Content-Type: text/html
状態s~code `431^st0 を伴う応答は、 ~cacheに格納されてはナラナイ。 ◎ Responses with the 431 status code MUST NOT be stored by a cache.
6. `511^st
状態s~code `511^st0 は、 次を指示する ⇒ `~client$は、 ~network~accessを~~取得するためには認証する必要がある。 ◎ The 511 status code indicates that the client needs to authenticate to gain network access.
応答の`表現$は、[ 利用者が`資格証$を提出できるような`資源$(例:~HTML~form) ]への~linkを包含するベキである。 ◎ The response representation SHOULD contain a link to a resource that allows the user to submit credentials (e.g., with an HTML form).
`511^st0 応答~自身は、 ~challengeや~login~interfaceを包含するベキでないことに注意 — そうすると、 ~browserは[ ~login~interfaceを,元々要請された~URLに結付けられたものとして示す ]ことになり, 混同の原因になるので。 ◎ Note that the 511 response SHOULD NOT contain a challenge or the login interface itself, because browsers would show the login interface as being associated with the originally requested URL, which may cause confusion.
`生成元~server$は、 状態s~code `511^st0 を生成するベキでない。 この状態s~codeは、[ ~networkへの~accessを制御する手段として差挟まれた`横取n~proxy$【!intercepting proxy】 ]による利用~用に意図されている。 ◎ The 511 status SHOULD NOT be generated by origin servers; it is intended for use by intercepting proxies that are interposed as a means of controlling access to the network.
状態s~code `511^st0 を伴う応答は、 ~cacheに格納されてはナラナイ。 ◎ Responses with the 511 status code MUST NOT be stored by a cache.
6.1. 状態s~code `511^st0 と~captive~portal
状態s~code `511^st0 は、 “~captive~portal” 【`横取n~proxy$の一種】が[ 介在している~network基盤ではなく,要請の~~宛先~server ]からの応答を期待している~software (とりわけ非~browser~UA)にもたらす問題を軽減するために設計されている。 `511^st0 が意図するのは、 ~captive~portalの配備を奨励することではなく, それらがもたらす被害を制限するために限られる。 ◎ The 511 status code is designed to mitigate problems caused by "captive portals" to software (especially non-browser agents) that is expecting a response from the server that a request was made to, not the intervening network infrastructure. It is not intended to encourage deployment of captive portals -- only to limit the damage caused by them.
~accessを是認する前に何らかの[ 認証や承諾規約, その他の利用者-ヤリトリ ]を要求したいと望む~network運用者は、 通例的に,まだそれを行ってない`~client$( “未知な~client” )を識別してから MAC ( `Media Access Control^en )~addressを利用して それを行う。 ◎ A network operator wishing to require some authentication, acceptance of terms, or other user interaction before granting access usually does so by identifying clients who have not done so ("unknown clients") using their Media Access Control (MAC) addresses.
このとき、 未知な~clientからの流通のうち, ~TCP~port 80 に対するものは[ 未知な~clientが “~log-inする” ための専用の~HTTP~server( “~login~server” ) ]へ送信され,それら以外は — ~login~server自身への流通は別として — すべて阻止される。 ◎ Unknown clients then have all traffic blocked, except for that on TCP port 80, which is sent to an HTTP server (the "login server") dedicated to "logging in" unknown clients, and of course traffic to the login server itself.
例えば、 ~UAが,~networkへ接続して~TCP~port 80 に対し次の~HTTP要請を為したとする: ◎ For example, a user agent might connect to a network and make the following HTTP request on TCP port 80: GET /index.htm HTTP/1.1 Host: www.example.com
GET /index.htm HTTP/1.1 Host: www.example.com
~login~serverは、 そのような要請を受信した際に `511^st0 応答を生成することになろう: ◎ Upon receiving such a request, the login server would generate a 511 response:
HTTP/1.1 511 Network Authentication Required
Content-Type: text/html
ここでは、 状態s~code `511^st0 により,[ 非~browser~clientは、応答を`生成元~server$からのものであると解釈しなくなる ]ことが確約され、 ~HTML `META^c 要素は,~UAを~login~serverへ~redirectする。 ◎ Here, the 511 status code assures that non-browser clients will not interpret the response as being from the origin server, and the META HTML element redirects the user agent to the login server.
7. ~securityの考慮点
7.1. `428^st
状態s~code `428$st0 は,任意選択~なので、 `~client$は,その利用に依拠して “更新喪失” の競合を防止することはできない。 ◎ The 428 status code is optional; clients cannot rely upon its use to prevent "lost update" conflicts.
7.2. `429^st
`~server$が[ 攻撃を受けている/ 単に単独の主体から度を越して多数の要請を受信している ]とき、 各~要請に対し状態s~code `429$st0 で応答すると, 資源を消費することになる。 ◎ When a server is under attack or just receiving a very large number of requests from a single party, responding to each with a 429 status code will consume resources.
したがって、 `~server$には,状態s~code `429$st0 を利用することは要求されない — 資源の利用度を制限するときは、 単に接続を落とすか他の手続きを踏む方が適切になり得る。 ◎ Therefore, servers are not required to use the 429 status code; when limiting resource usage, it may be more appropriate to just drop connections, or take other steps.
7.3. `431^st
~serverには、 状態s~code `431$st0 を利用することは要求されない — 攻撃を受けているときは、 単に接続を落とすか他の手続きを踏む方が適切になり得る。 ◎ Servers are not required to use the 431 status code; when under attack, it may be more appropriate to just drop connections, or take other steps.
7.4. `511^st
共通的な利用においては、 状態s~code `511$st0 を運んでいる応答は, 要請の~URLに指示された`生成元~server$からは来ない。 これは、 多くの~securityの課題をもたらす — 例:攻撃している`媒介者$は、 元の~domainの名前~空間の中に~cookieを挿入していたり, ~cookieや~UAから送信された~HTTP認証用の`資格証$を観測していること, 等々もある。 ◎ In common use, a response carrying the 511 status code will not come from the origin server indicated in the request's URL. This presents many security issues; e.g., an attacking intermediary may be inserting cookies into the original domain's name space, may be observing cookies or HTTP authentication credentials sent from the user agent, and so on.
しかしながら、 これらの~riskは,状態s~code `511$st0 に限られるものではない。 言い換えれば、 この状態s~codeを利用していない~captive~portalも,同じ課題を導入する。 ◎ However, these risks are not unique to the 511 status code; in other words, a captive portal that is not using this status code introduces the same issues.
また、 この状態s~codeを[ ~SSL/~TLS ]接続~上で(共通的なのは,~port 443)利用している~captive~portalは、 ~clientに対し証明書~errorを生成することになることに注意。 ◎ Also, note that captive portals using this status code on a Secure Socket Layer (SSL) or Transport Layer Security (TLS) connection (commonly, port 443) will generate a certificate error on the client.
8. ~IANA考慮点
`~HTTP状態s~code~registry@~IANA-a/http-status-codes$cite は、 次に挙げる~entryで更新された: ◎ The HTTP Status Codes registry has been updated with the following entries:
値(記述) | 参照 |
---|---|
`428$st | [RFC6585] |
`429$st | [RFC6585] |
`431$st | [RFC6585] |
`511$st | [RFC6585] |
付録 A. 謝辞
示唆と~feedbackを寄せられた `Jan Algermissen^en, `Julian Reschke^en 両氏に。 ◎ Thanks to Jan Algermissen and Julian Reschke for their suggestions and feedback.
付録 B. ~captive~portalにより提起される課題
`~client$は,[ ~portalの応答, 通信しようと意図する~HTTP~serverの応答 ]を相違化できないので、 いくつかの課題が発生する。 状態s~code `511$st0 は、 それらの一部を軽減する補助になることが意図されている。 ◎ Since clients cannot differentiate between a portal's response and that of the HTTP server that they intended to communicate with, a number of issues arise. The 511 status code is intended to help mitigate some of them.
例として、~accessしている~siteを識別するために~browserが共通的に利用する, "favicon.ico" `Favicon$r が挙げられる。 所与の~site用の~faviconが, 意図された~siteの代わりに~captive~portalから~fetchされた場合 (例:利用者はまだ認証されてないときなど)、 それは,~portal~sessionを超えて~browserの~cache内に “張付く” ことが多い (ほとんどの実装は、~faviconを積極的に~cacheする) — その~~結果、[ その~portalの~faviconが正当な~siteのそれを “乗っ取った” ]かのように見えるようになる。 ◎ One example is the "favicon.ico" [Favicon] commonly used by browsers to identify the site being accessed. If the favicon for a given site is fetched from a captive portal instead of the intended site (e.g., because the user is unauthenticated), it will often "stick" in the browser's cache (most implementations cache favicons aggressively) beyond the portal session, so that it seems as if the portal's favicon has "taken over" the legitimate site.
~browserに基づく別の課題は、 ~privacy選好~用の~platform `P3P$r が~supportされるときに起こる。 それが実装される方法に依存して、 ~browserは, p3p.xml ~fileに対する~portalからの応答を~serverからの応答と解釈する可能性もある — その結果、 ~portalにより広告された~privacy施策(またはその欠如)が, 意図された~siteに適用されるものと解釈される。 ~Webに基づく他の~protocol — `WebFinger$r, `CORS$r, `OAuth2.0$r など — も、 そのような課題に脆弱になり得る。 ◎ Another browser-based issue comes about when the Platform for Privacy Preferences [P3P] is supported. Depending on how it is implemented, it's possible a browser might interpret a portal's response for the p3p.xml file as the server's, resulting in the privacy policy (or lack thereof) advertised by the portal being interpreted as applying to the intended site. Other Web-based protocols such as WebFinger [WebFinger], Cross-Origin Resource Sharing [CORS], and Open Authorization [OAuth2.0] may also be vulnerable to such issues.
~HTTPは,~Web~browserで最も広範に利用されているが、 それを基底層の~protocolとして利用する非~browser応用も数を伸ばしている。 例えば, WebDAV `RFC4918$r (~remote著作~用の応用)や, その拡張 CalDAV `RFC4791$r (予定表編集( `calendaring^en )用の応用) は、 どちらも,~HTTPを基礎として利用する。 これらの応用を~captive~portalの背後から利用すると、 利用者に偽物の~errorを呈示する結果になるかもしれず, 極端な事例では内容が破損するかもしれない。 ◎ Although HTTP is most widely used with Web browsers, a growing number of non-browsing applications use it as a substrate protocol. For example, Web Distributed Authoring and Versioning (WebDAV) [RFC4918] and Calendaring Extensions to WebDAV (CalDAV) [RFC4791] both use HTTP as the basis (for remote authoring and calendaring, respectively). Using these applications from behind a captive portal can result in spurious errors being presented to the user, and might result in content corruption, in extreme cases.
同様に,~HTTPを利用している他の非~browser応用も影響され得る — 例: `WIDGETS$r, ~software更新, その他の特化された~software — Twitter ~clientや iTunes Music Store — など。 ◎ Similarly, other non-browser applications using HTTP can be affected as well, e.g., widgets [WIDGETS], software updates, and other specialized software such as Twitter clients and the iTunes Music Store.
ときには、[ ~HTTP~redirectionを利用して~portalへの流通を~directすることが,これらの課題に取組む ]ものと予見されることも, ここに記しておくべきであろう。 しかしながら、 これらの多くは “追従する” ~redirectを利用するので, 良い解決策ではない。 ◎ It should be noted that it's sometimes believed that using HTTP redirection to direct traffic to the portal addresses these issues. However, since many of these uses "follow" redirects, this is not a good solution.