[要約] RFC 7538は、HTTPステータスコード308(Permanent Redirect)に関する情報を提供しています。このRFCの目的は、クライアントがリクエストを新しいURIに再送信するように促すことです。

Internet Engineering Task Force (IETF)                        J. Reschke
Request for Comments: 7538                                    greenbytes
Obsoletes: 7238                                               April 2015
Category: Standards Track
ISSN: 2070-1721
        

The Hypertext Transfer Protocol Status Code 308 (Permanent Redirect)

ハイパーテキスト転送プロトコルのステータスコード308(永続的なリダイレクト)

Abstract

概要

This document specifies the additional Hypertext Transfer Protocol (HTTP) status code 308 (Permanent Redirect).

このドキュメントでは、追加のハイパーテキスト転送プロトコル(HTTP)ステータスコード308(Permanent Redirect)を指定しています。

Status of This Memo

本文書の状態

This is an Internet Standards Track document.

これはInternet Standards Trackドキュメントです。

This document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in Section 2 of RFC 5741.

このドキュメントは、IETF(Internet Engineering Task Force)の製品です。これは、IETFコミュニティのコンセンサスを表しています。公開レビューを受け、インターネットエンジニアリングステアリンググループ(IESG)による公開が承認されました。インターネット標準の詳細については、RFC 5741のセクション2をご覧ください。

Information about the current status of this document, any errata, and how to provide feedback on it may be obtained at http://www.rfc-editor.org/info/rfc7538.

このドキュメントの現在のステータス、エラータ、およびフィードバックの提供方法に関する情報は、http://www.rfc-editor.org/info/rfc7538で入手できます。

Copyright Notice

著作権表示

Copyright (c) 2015 IETF Trust and the persons identified as the document authors. All rights reserved.

Copyright(c)2015 IETF Trustおよびドキュメントの作成者として識別された人物。全著作権所有。

This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.

この文書は、BCP 78およびIETF文書に関するIETFトラストの法的規定(http://trustee.ietf.org/license-info)の対象であり、この文書の発行日に有効です。これらのドキュメントは、このドキュメントに関するあなたの権利と制限を説明しているため、注意深く確認してください。このドキュメントから抽出されたコードコンポーネントには、Trust Legal Provisionsのセクション4.eに記載されているSimplified BSD Licenseのテキストが含まれている必要があり、Simplified BSD Licenseに記載されているように保証なしで提供されます。

Table of Contents

目次

   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   2
   2.  Notational Conventions  . . . . . . . . . . . . . . . . . . .   2
   3.  308 Permanent Redirect  . . . . . . . . . . . . . . . . . . .   3
   4.  Deployment Considerations . . . . . . . . . . . . . . . . . .   3
   5.  Security Considerations . . . . . . . . . . . . . . . . . . .   4
   6.  IANA Considerations . . . . . . . . . . . . . . . . . . . . .   5
   7.  References  . . . . . . . . . . . . . . . . . . . . . . . . .   5
     7.1.  Normative References  . . . . . . . . . . . . . . . . . .   5
     7.2.  Informative References  . . . . . . . . . . . . . . . . .   5
   Acknowledgements  . . . . . . . . . . . . . . . . . . . . . . . .   6
   Author's Address  . . . . . . . . . . . . . . . . . . . . . . . .   6
        
1. Introduction
1. はじめに

HTTP defines a set of status codes for the purpose of redirecting a request to a different URI ([RFC3986]). The history of these status codes is summarized in Section 6.4 of [RFC7231], which also classifies the existing status codes into four categories.

HTTPは、要求を別のURI([RFC3986])にリダイレクトするための一連のステータスコードを定義します。これらのステータスコードの履歴は、[RFC7231]のセクション6.4にまとめられており、既存のステータスコードも4つのカテゴリに分類されます。

The first of these categories contains the status codes 301 (Moved Permanently), 302 (Found), and 307 (Temporary Redirect), which can be classified as below:

これらのカテゴリの最初のカテゴリには、ステータスコード301(永久に移動)、302(見つかりました)、および307(一時的なリダイレクト)が含まれ、以下のように分類できます。

   +-------------------------------------------+-----------+-----------+
   |                                           | Permanent | Temporary |
   +-------------------------------------------+-----------+-----------+
   | Allows changing the request method from   | 301       | 302       |
   | POST to GET                               |           |           |
   | Does not allow changing the request       | -         | 307       |
   | method from POST to GET                   |           |           |
   +-------------------------------------------+-----------+-----------+
        

Section 6.4.7 of [RFC7231] states that it does not define a permanent variant of status code 307; this specification adds the status code 308, defining this missing variant (Section 3).

[RFC7231]のセクション6.4.7は、ステータスコード307の永続的なバリアントを定義しないと述べています。この仕様では、この不足しているバリアントを定義するステータスコード308を追加しています(セクション3)。

This specification contains no technical changes from the Experimental RFC 7238, which it obsoletes.

この仕様には、廃止された実験的RFC 7238からの技術的な変更は含まれていません。

2. Notational Conventions
2. 表記規則

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].

このドキュメントのキーワード「MUST」、「MUST NOT」、「REQUIRED」、「SHALL」、「SHALL NOT」、「SHOULD」、「SHOULD NOT」、「RECOMMENDED」、「MAY」、および「OPTIONAL」は、 [RFC2119]で説明されているように解釈されます。

3. 308 Permanent Redirect
3. 308永久リダイレクト

The 308 (Permanent Redirect) status code indicates that the target resource has been assigned a new permanent URI and any future references to this resource ought to use one of the enclosed URIs. Clients with link editing capabilities ought to automatically re-link references to the effective request URI (Section 5.5 of [RFC7230]) to one or more of the new references sent by the server, where possible.

308(永続的なリダイレクト)ステータスコードは、ターゲットリソースに新しい永続的なURIが割り当てられており、このリソースへの今後の参照では、囲まれたURIの1つを使用する必要があることを示します。リンク編集機能を備えたクライアントは、有効なリクエストURI([RFC7230]のセクション5.5)への参照を、可能な場合はサーバーから送信される1つ以上の新しい参照に自動的に再リンクする必要があります。

The server SHOULD generate a Location header field ([RFC7231], Section 7.1.2) in the response containing a preferred URI reference for the new permanent URI. The user agent MAY use the Location field value for automatic redirection. The server's response payload usually contains a short hypertext note with a hyperlink to the new URI(s).

サーバーは、新しい永続的なURIの優先URI参照を含む応答でLocationヘッダーフィールド([RFC7231]、セクション7.1.2)を生成する必要があります(SHOULD)。ユーザーエージェントは、自動リダイレクトのためにLocationフィールド値を使用してもよい(MAY)。サーバーの応答ペイロードには、通常、新しいURIへのハイパーリンクを含む短いハイパーテキストノートが含まれています。

A 308 response is cacheable by default; i.e., unless otherwise indicated by the method definition or explicit cache controls (see [RFC7234], Section 4.2.2).

308応答はデフォルトでキャッシュ可能です。つまり、メソッド定義または明示的なキャッシュ制御によって特に示されていない限り([RFC7234]、セクション4.2.2を参照)。

Note: This status code is similar to 301 (Moved Permanently) ([RFC7231], Section 6.4.2), except that it does not allow changing the request method from POST to GET.

注:このステータスコードは、リクエストメソッドをPOSTからGETに変更できないことを除いて、301(恒久的に移動)([RFC7231]、セクション6.4.2)に似ています。

4. Deployment Considerations
4. 導入に関する考慮事項

Section 6 of [RFC7231] requires recipients to treat unknown 3xx status codes the same way as status code 300 (Multiple Choices) ([RFC7231], Section 6.4.1). Thus, servers will not be able to rely on automatic redirection happening similar to status codes 301, 302, or 307.

[RFC7231]のセクション6では、受信者が不明な3xxステータスコードをステータスコード300(Multiple Choices)([RFC7231]、セクション6.4.1)と同じ方法で処理する必要があります。したがって、サーバーは、ステータスコード301、302、または307のように発生する自動リダイレクトに依存できなくなります。

Therefore, the use of status code 308 is restricted to cases where the server has sufficient confidence in the client's understanding the new code or when a fallback to the semantics of status code 300 is not problematic. Server implementers are advised not to vary the status code based on characteristics of the request, such as the User-Agent header field ("User-Agent Sniffing") -- doing so usually results in code that is both hard to maintain and hard to debug and would also require special attention to caching (i.e., setting a "Vary" response header field, as defined in Section 7.1.4 of [RFC7231]).

したがって、ステータスコード308の使用は、サーバーがクライアントが新しいコードを理解するのに十分な信頼がある場合、またはステータスコード300のセマンティクスへのフォールバックが問題にならない場合に制限されます。サーバー実装者は、User-Agentヘッダーフィールド(「User-Agent Sniffing」)などのリクエストの特性に基づいてステータスコードを変更しないようにアドバイスされています。これを行うと、通常、コードの保守と管理が困難になります。デバッグし、キャッシュにも特別な注意が必要です(つまり、[RFC7231]のセクション7.1.4で定義されているように、「Vary」応答ヘッダーフィールドを設定します)。

Note that many existing HTML-based user agents will emulate a refresh when encountering an HTML <meta> refresh directive ([HTML], Section 4.2.5.3). This can be used as another fallback. For example:

多くの既存のHTMLベースのユーザーエージェントは、HTML <meta>更新ディレクティブ([HTML]、セクション4.2.5.3)に遭遇すると、更新をエミュレートすることに注意してください。これは別のフォールバックとして使用できます。例えば:

Client request:

クライアントのリクエスト:

GET / HTTP/1.1 Host: example.com

GET / HTTP / 1.1ホスト:example.com

Server response:

サーバーの応答:

     HTTP/1.1 308 Permanent Redirect
     Content-Type: text/html; charset=UTF-8
     Location: http://example.com/new
     Content-Length: 356
        
     <!DOCTYPE HTML>
     <html>
        <head>
           <title>Permanent Redirect</title>
           <meta http-equiv="refresh"
                 content="0; url=http://example.com/new">
        </head>
        <body>
           <p>
              The document has been moved to
              <a href="http://example.com/new"
              >http://example.com/new</a>.
           </p>
        </body>
     </html>
        
5. Security Considerations
5. セキュリティに関する考慮事項

All security considerations that apply to HTTP redirects apply to the 308 status code as well (see Section 9 of [RFC7231]).

HTTPリダイレクトに適用されるすべてのセキュリティ上の考慮事項は、308ステータスコードにも適用されます([RFC7231]のセクション9を参照)。

Unsecured communication over the Internet is subject to man-in-the-middle modification of messages, including changing status codes or redirect targets. Use of Transport Layer Security (TLS) is one way to mitigate those attacks. See Section 9 of [RFC7230] for related attacks on authority and message integrity.

インターネットを介した安全でない通信は、ステータスコードやリダイレクトターゲットの変更など、中間者によるメッセージの変更の影響を受けます。トランスポート層セキュリティ(TLS)の使用は、これらの攻撃を軽減する1つの方法です。権限とメッセージの整合性に対する関連する攻撃については、[RFC7230]のセクション9を参照してください。

6. IANA Considerations
6. IANAに関する考慮事項

The "Hypertext Transfer Protocol (HTTP) Status Code Registry" (defined in Section 8.2 of [RFC7231] and located at <http://www.iana.org/assignments/http-status-codes>) has been updated to reference this specification.

「ハイパーテキスト転送プロトコル(HTTP)ステータスコードレジストリ」([RFC7231]のセクション8.2で定義され、<http://www.iana.org/assignments/http-status-codes>にあります)は、これを参照するように更新されました仕様。

   +-------+--------------------+----------------------------------+
   | Value | Description        | Reference                        |
   +-------+--------------------+----------------------------------+
   | 308   | Permanent Redirect | Section 3 of this specification  |
   +-------+--------------------+----------------------------------+
        
7. References
7. 参考文献
7.1. Normative References
7.1. 引用文献

[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997, <http://www.rfc-editor.org/info/rfc2119>.

[RFC2119] Bradner、S。、「要件レベルを示すためにRFCで使用するキーワード」、BCP 14、RFC 2119、1997年3月、<http://www.rfc-editor.org/info/rfc2119>。

[RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform Resource Identifier (URI): Generic Syntax", STD 66, RFC 3986, January 2005, <http://www.rfc-editor.org/info/rfc3986>.

[RFC3986] Berners-Lee、T.、Fielding、R。、およびL. Masinter、「Uniform Resource Identifier(URI):Generic Syntax」、STD 66、RFC 3986、2005年1月、<http://www.rfc- editor.org/info/rfc3986>。

[RFC7230] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing", RFC 7230, June 2014, <http://www.rfc-editor.org/info/rfc7230>.

[RFC7230]フィールディング、R。、エド。およびJ. Reschke編、「Hypertext Transfer Protocol(HTTP / 1.1):Message Syntax and Routing」、RFC 7230、2014年6月、<http://www.rfc-editor.org/info/rfc7230>。

[RFC7231] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content", RFC 7231, June 2014, <http://www.rfc-editor.org/info/rfc7231>.

[RFC7231]フィールディング、R。、エド。およびJ. Reschke編、「Hypertext Transfer Protocol(HTTP / 1.1):Semantics and Content」、RFC 7231、2014年6月、<http://www.rfc-editor.org/info/rfc7231>。

[RFC7234] Fielding, R., Ed., Nottingham, M., Ed., and J. Reschke, Ed., "Hypertext Transfer Protocol (HTTP/1.1): Caching", RFC 7234, June 2014, <http://www.rfc-editor.org/info/rfc7234>.

[RFC7234] Fielding、R。、編、Nottingham、M。、編、およびJ. Reschke、編、「Hypertext Transfer Protocol(HTTP / 1.1):Caching」、RFC 7234、2014年6月、<http:/ /www.rfc-editor.org/info/rfc7234>。

7.2. Informative References
7.2. 参考引用

[HTML] Hickson, I., Berjon, R., Faulkner, S., Leithead, T., Doyle Navara, E., O'Connor, E., and S. Pfeiffer, "HTML5", W3C Recommendation REC-html5-20141028, October 2014, <http://www.w3.org/TR/2014/REC-html5-20141028/>.

[HTML] Hickson、I.、Berjon、R.、Faulkner、S.、Leithead、T.、Doyle Navara、E.、O'Connor、E.、and S. Pfeiffer、 "HTML5"、W3C Recommendation REC-html5 -20141028、2014年10月、<http://www.w3.org/TR/2014/REC-html5-20141028/>。

Latest version available at <http://www.w3.org/TR/html5/>.

<http://www.w3.org/TR/html5/>で入手可能な最新バージョン。

Acknowledgements

謝辞

The definition for the new status code 308 reuses text from the HTTP/1.1 definitions of status codes 301 and 307.

新しいステータスコード308の定義は、ステータスコード301および307のHTTP / 1.1定義からのテキストを再利用します。

Furthermore, thanks to Ben Campbell, Cyrus Daboo, Adrian Farrell, Eran Hammer-Lahav, Bjoern Hoehrmann, Barry Leiba, Subramanian Moonesamy, Kathleen Moriarty, Peter Saint-Andre, Robert Sparks, and Roy Fielding for feedback on this document.

さらに、このドキュメントに関するフィードバックを提供してくれたBen Campbell、Cyrus Daboo、Adrian Farrell、Eran Hammer-Lahav、Bjoern Hoehrmann、Barry Leiba、Subramanian Moonesamy、Kathleen Moriarty、Peter Saint-Andre、Robert Sparksに感謝します。

Author's Address

著者のアドレス

Julian F. Reschke greenbytes GmbH Hafenweg 16 Muenster, NW 48155 Germany

Julian F. Reschke greenbytes GmbH Hafenweg 16 Muenster、NW 48155ドイツ

   EMail: julian.reschke@greenbytes.de
   URI:   http://greenbytes.de/tech/webdav/