[要約] RFC 7238は、HTTPステータスコード308(Permanent Redirect)についての仕様を定めています。このステータスコードは、リクエストされたリソースが恒久的に移動したことを示すために使用されます。

Internet Engineering Task Force (IETF)                        J. Reschke
Request for Comments: 7238                                    greenbytes
Category: Experimental                                         June 2014
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 document is not an Internet Standards Track specification; it is published for examination, experimental implementation, and evaluation.

このドキュメントはInternet Standards Trackの仕様ではありません。試験、実験、評価のために公開されています。

This document defines an Experimental Protocol for the Internet community. 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). Not all documents approved by the IESG are a candidate for any level of Internet Standard; see Section 2 of RFC 5741.

このドキュメントでは、インターネットコミュニティの実験プロトコルを定義します。このドキュメントは、IETF(Internet Engineering Task Force)の製品です。これは、IETFコミュニティのコンセンサスを表しています。公開レビューを受け、インターネットエンジニアリングステアリンググループ(IESG)による公開が承認されました。 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/rfc7238.

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

Copyright Notice

著作権表示

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

Copyright(c)2014 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  . . . . . . . . . . . . . . . . . . . . 2
   4.  Deployment Considerations . . . . . . . . . . . . . . . . . . . 3
   5.  Security Considerations . . . . . . . . . . . . . . . . . . . . 4
   6.  IANA Considerations . . . . . . . . . . . . . . . . . . . . . . 4
   7.  Acknowledgements  . . . . . . . . . . . . . . . . . . . . . . . 5
   8.  References  . . . . . . . . . . . . . . . . . . . . . . . . . . 5
     8.1.  Normative References  . . . . . . . . . . . . . . . . . . . 5
     8.2.  Informative References  . . . . . . . . . . . . . . . . . . 5
        
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 HTTP 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は、HTTPがステータスコード307の永続的なバリアントを定義しないことを述べています。この仕様では、この不足しているバリアントを定義するステータスコード308を追加しています(セクション3)。

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.

308(Permanent Redirect)ステータスコードは、ターゲットリソースに新しい永続的なURIが割り当てられ、このリソースへの今後の参照では、囲まれたURIの1つを使用する必要があることを示します。

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.

リンク編集機能を備えたクライアントは、有効なリクエスト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, initial use of status code 308 will be 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]). This can be used as another fallback. For example:

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

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: 454
        
     <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
                           "http://www.w3.org/TR/html4/strict.dtd">
     <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を参照)。

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

The registration below has been added to 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>):

以下の登録は、[ハイパーテキスト転送プロトコル(HTTP)ステータスコードレジストリ]([RFC7231]のセクション8.2で定義されており、<http://www.iana.org/assignments/http-status-codes>にあります)に追加されています。 ):

   +-------+--------------------+---------------------------------+
   | Value | Description        | Reference                       |
   +-------+--------------------+---------------------------------+
   | 308   | Permanent Redirect | Section 3 of this specification |
   +-------+--------------------+---------------------------------+
        
7. Acknowledgements
7. 謝辞

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, Eran Hammer-Lahav, Bjoern Hoehrmann, Subramanian Moonesamy, Peter Saint-Andre, and Robert Sparks for feedback on this document.

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

8. References
8. 参考文献
8.1. Normative References
8.1. 引用文献

[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997.

[RFC2119] Bradner、S。、「要件レベルを示すためにRFCで使用するキーワード」、BCP 14、RFC 2119、1997年3月。

[RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform Resource Identifier (URI): Generic Syntax", STD 66, RFC 3986, January 2005.

[RFC3986] Berners-Lee、T.、Fielding、R。、およびL. Masinter、「Uniform Resource Identifier(URI):Generic Syntax」、STD 66、RFC 3986、2005年1月。

[RFC7230] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing", RFC 7230, June 2014.

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

[RFC7231] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content", RFC 7231, June 2014.

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

[RFC7234] Fielding, R., Ed., Nottingham, M., Ed., and J. Reschke, Ed., "Hypertext Transfer Protocol (HTTP/1.1): Caching", RFC 7234, June 2014.

[RFC7234] Fielding、R.、Ed。、Nottingham、M.、Ed。、and J. Reschke、Ed。、 "Hypertext Transfer Protocol(HTTP / 1.1):Caching"、RFC 7234、June 2014。

8.2. Informative References
8.2. 参考引用

[HTML] Raggett, D., Le Hors, A., and I. Jacobs, "HTML 4.01 Specification", W3C Recommendation REC-html401-19991224, December 1999, <http://www.w3.org/TR/1999/REC-html401-19991224>.

[HTML] Raggett、D.、Le Hors、A。、およびI. Jacobs、「HTML 4.01仕様」、W3C勧告REC-html401-19991224、1999年12月、<http://www.w3.org/TR/1999 / REC-html401-19991224>。

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

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

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/