#?SuikaWiki/0.9 page-icon="HTTP" [[#comment]] * RFC 2068 → RFC 2616 の仕様変更 [1] RFC 2068 では、 [CODE(HTTP)[Max-Forwards:]] 頭欄に串・関門が対応することは推奨 ([CODE[[[SHOULD]]]]) でしたが、 RFC 2616 では必須 ([CODE[[[MUST]]]]) になりました。 ですから、 RFC 2068 に従う中継者が要求鎖中に要ると正しく機能しないかもしれません。 (RFC 2068 に従う中継者ばかりであったら正しく機能する保証がありませんでしたが、 RFC 2616 に従う中継者ばかりなら必ず正しく機能します。[WEAK[もっとも、どちらの RFC に従うか判定する方法はありませんけどね。]]) [2] RFC 2068 では、 [CODE(HTTP)[Max-Forwards]] に対応していない[[方式]]では無視するべきだと言っていましたが、 RFC 2616 は無視しても良いと言っています。 ですから、どちらに従っていても、 [CODE(HTTP)[Max-Forwards]] とは無関係の方式を使っているときに中継者が数を減らしてしまう可能性があります。 [CODE(HTTP)[0]] に反応して要求鎖の途中で応答が戻ってくる可能性もあります。 [[#comment]] * 仕様書から ** RFC 2068・2616 (HTTP/1.1) 14.31 Max-Forwards > The Max-Forwards request-header field [DEL[may be used]] [INS[provides a mechanism]] with the TRACE [DEL[method (section 14.31)]] [INS[(section 9.8) and OPTIONS (section 9.2) methods]] to limit the number of proxies or gateways that can forward the request to the next inbound server. This can be useful when the client is attempting to trace a request chain which appears to be failing or looping in mid-chain. [CODE(HTTP)[Max-Forwards]] [[要求頭欄]]は、 [CODE(HTTP)[[[TRACE]]]] 方式および [CODE(HTTP)[[[OPTIONS]]]] と共に使って、次の[[上り]]サーバーに[[要求]]を転送することができる[[串]]または[[関門]]の数を制限する機構を提供します。 これは、クライアントが鎖途中で失敗したり循環したりしているっぽい[[要求鎖]]を追跡しようとする時に便利です。 > -Max-Forwards = "Max-Forwards" ":" 1*DIGIT > The Max-Forwards value is a decimal integer indicating the remaining number of times this request message may be forwarded. [CODE(HTTP)[Max-Forwards]] 値は、この要求メッセージが転送されても良い残り回数を示す十進整数です。 > Each proxy or gateway recipient of a TRACE [INS[or OPTIONS]] request containing a Max-Forwards header field [DEL[SHOULD]] [INS[MUST]] check and update its value prior to forwarding the request. If the received value is zero (0), the recipient [DEL[SHOULD NOT]] [INS[MUST NOT]] forward the request; instead, it [DEL[SHOULD]] [INS[MUST]] respond as the final recipient [DEL[with a 200 (OK) response containing the received request message as the response entity-body (as described in section 9.8)]]. If the received Max-Forwards value is greater than zero, then the forwarded message [DEL[SHOULD]] [INS[MUST]] contain an updated Max-Forwards field with a value decremented by one (1). [CODE(HTTP)[Max-Forwards]] 頭欄を含んだ [CODE(HTTP)[TRACE}] 要求または [CODE(HTTP)[OPTIONS]] 要求のそれぞれの串または関門である受信者は、 要求を転送する前に [CODE(HTTP)[Max-Forwards]] 頭欄の値を確認し、更新しなければ'''なりません'''。受信した値が零 ([CODE(HTTP)[0]]) なら、受信者はその要求を転送しては'''なりません'''。 代わりに、最終受信者として応答します。受信した [CODE(HTTP)[Max-Forwards]] 値が零より大きければ、転送されるメッセージは一 8[CODE(HTTP)[1]]) 減らした値の [CODE(HTTP)[Max-Forwards]] 欄を含まなければ'''なりません'''。 > The Max-Forwards header field [DEL[SHOULD]] [INS[MAY]] be ignored for all other methods defined by this specification and for any extension methods for which it is not explicitly referred to as part of that method definition. [CODE(HTTP)[Max-Forwards]] 頭欄は、この仕様書で定義されたほかのすべての方式および方式定義の一部で陽に言及していない拡張方式では無視しても'''構いません'''。 ** RFC の部分の License [[RFCのライセンス]] *メモ