* Allow vs Allowed - [1] [HTTP92] では、 [CODE(HTTP)[Allow:]] という記述と [CODE(HTTP)[[[Allowed]]:]] という記述が混じっています。 - [2] 歴史的には [CODE(HTTP)[Allow:]] が正しいです。 * 状態符号 [406] [CODE(HTTP)@en[[[Allow:]]]] 欄は [CODE(HTTP)[[[405]]]] [[応答]]に存在しなければ[['''なりません''']]。 * 仕様書から ** RFC 1945 (HTTP/1.0) 10.1; RFC 2068 (HTTP/1.1) 14.7 Allow > The Allow entity-header field lists the set of methods supported by the resource identified by the Request-URI. The purpose of this field is strictly to inform the recipient of valid methods associated with the resource. The Allow header field [DEL[[INS[{1945}]] is not permitted in a request as part of a POST entity]] [INS[[INS[{2068〜}]] MUST be present in a 405 (Method Not Allowed) response]]. [CODE(HTTP)[Allow]] 実体頭欄は、 [[Request-URI]] で識別される資源が対応している [[method]] の集合を列挙します。この欄の目的は、 その資源に関連付けられた妥当な method を受信者に厳密に通知することです。 [CODE(HTTP)[Allow]] 頭欄は、 [DEL[[INS[{1945}]] 要求の [[POST]] 実体の一部としては認めません。]] [INS[[INS[{2068〜}]] [CODE(HTTP)[[[405]]]] (Method 不認可) 応答中に出現しなければ'''なりません'''。]] > - [DEL[[INS[{〜2068}]] Allow = "Allow" ":" 1#method]] - [INS[[INS[{2616}]] Allow = "Allow" ":" #Method]] >Example of use: [INS[使用例 : ]] > - Allow: GET, HEAD[INS[, PUT [INS[{2068}]]]] >This field cannot prevent a client from trying other methods. However, the indications given by the Allow header field value [DEL[[INS[{1945}]] should]] [INS[[INS[{2068}]] SHOULD]] be followed. The actual set of allowed methods is defined by the origin server at the time of each request. この欄は、クライアントアが他の method を試行することを防ぐことは出来ません。 しかし、 [CODE(HTTP)[Allow]] 頭欄値による標示には従う'''べきです'''。 認められる method の実際の集合は、各要求の時点[[起源サーバー]]により定義されます。 [INS[ > [INS[{2068〜}]] The Allow header field MAY be provided with a PUT request to recommend the methods to be supported by the new or modified resource. The server is not required to support these methods and SHOULD include an Allow header in the response giving the actual supported methods. [CODE(HTTP)[Allow]] 頭欄は、新規のまたは修正済みの資源が対応している method を推奨するために [CODE(HTTP)[[[PUT]]]] 要求で提供しても'''構いません'''。 サーバーはそれらの method に対応する必要はありませんし、 応答中の [CODE(HTTP)[Allow]] 頭には実際に対応している method を含める'''べきです'''。 ]INS] >A proxy [DEL[[INS[{1945}]] must not]] [INS[[INS[{2068}]] MUST NOT]] modify the Allow header field even if it does not understand all the methods specified, since the user agent [DEL[[INS[{1945}]] may]] [DEL[[INS[[INS[{2068}]] MAY]]]] [INS[[INS[{2616}]] might]] have other means of communicating with the origin server. [[串]]は、指定された全ての method を理解しないとしても、 [CODE(HTTP)[Allow]] 頭欄を修正しては'''なりません'''。 [[利用者エージェント]]はもしかすると起源サーバーと通信する他の手段を持っているかもしれないからです。 [DEL[ > [INS[{〜2068}]] The Allow header field does not indicate what methods are implemented [DEL[[INS[{1945}]] by]] [INS[[INS[{2068}]] at]] the server [INS[[INS[{2068}]] level]]. [INS[[INS[{2068}]] Servers MAY use the Public response-header field (section 14.35) to describe what methods are implemented on the server as a whole.]] [CODE(HTTP)[Allow]] 頭欄は、サーバー段階でどの method が実装されているかは示しません。サーバーは、 サーバー全体としてどの method を実装しているかを記述するのに、 [CODE(HTTP)[[[Public]]]] 応答頭欄を使っても'''構いません'''。 ]DEL] ** RFC の部分の License [[RFCのライセンス]] * 関連 [3] [CODE(HTTP)@en[[[Allow]]]] に [CODE(HTTP)@en[[[PATCH]]]] が含まれる場合、 [CODE(HTTP)@en[[[Accept-Patch]]]] [[頭欄]]も[[応答]]に含める[['''べきです''']] [SRC[[[RFC 5789]]]]。