インターネットエンジニアリングタスクフォース (IETF) R. Hamilton
Request for Comments: 9220 Google
カテゴリ: 標準トラック 2022年6月
ISSN: 2070-1721

HTTP/3 による WebSockets のブートストラップ


概要

HTTP/2 接続の単一ストリーム上で WebSocket プロトコルを実行するための仕組みは、HTTP/3 に対しても同様に適用可能ですが、HTTP のバージョン固有の詳細は明確にする必要があります。本書はその仕組みを HTTP/3 に合わせてどのように適応するかを説明します。

本メモの状態

これはインターネット標準トラックの文書です。

この文書は Internet Engineering Task Force (IETF) の成果物です。IETF コミュニティの合意を表しています。公開審査を受け、Internet Engineering Steering Group (IESG) によって公開が承認されています。インターネット標準に関するさらなる情報は RFC 7841 のセクション 2 をご覧ください。

この文書の現状、訂正情報、およびフィードバックの送付方法に関する情報は https://www.rfc-editor.org/info/rfc9220 で入手できます。

Copyright Notice

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

This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://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 Revised BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Revised BSD License.


1. 導入

"Bootstrapping WebSockets with HTTP/2" [RFC8441] は、HTTP/2 ([HTTP/2]) に対する拡張を定義しており、その拡張は HTTP/3 ([HTTP/3]) においても有用です。この拡張は HTTP/2 の設定を利用します。付録 A.3[HTTP/3])は、HTTP/2 から HTTP/3 へ設定を移植する際に、どのような変更(もしあれば)が適切かについての指針を示しています。


2. 表記と定義

本書におけるキーワード "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", および "OPTIONAL" は、すべて大文字で表記される場合に限り BCP 14([RFC2119] および [RFC8174])に従って解釈されます。


3. HTTP/3 上での WebSockets アップグレード

[RFC8441] は、HTTP/2 接続の単一ストリーム上で WebSocket プロトコル ([RFC6455]) を実行するための仕組みを定義しています。この仕組みは Extended CONNECT メソッドを定義し、新しい ":protocol" 擬似ヘッダーフィールドと ":path" および ":authority" 擬似ヘッダーフィールドに対する新しい意味論を規定します。また、サーバーがクライアントに Extended CONNECT の使用を許可するために送る新しい HTTP/2 設定も定義しています。

これらの擬似ヘッダーフィールドと設定の意味論は、[RFC8441] に定義されている HTTP/2 のものと同一です。付録 A.3[HTTP/3])は、HTTP/3 の設定が HTTP/3 用に個別に登録される必要があることを要求しています。SETTINGS_ENABLE_CONNECT_PROTOCOL の値は HTTP/2 と同様に 0x08(10 進で 8)です。

サーバーが Extended CONNECT をサポートすると広告しているにもかかわらず、受信した Extended CONNECT リクエストの ":protocol" 値が不明またはサポートされていない場合、サーバーはそのリクエストに対して 501 (Not Implemented) ステータスコードで応答することが SHOULD です(詳細は RFC 9110 セクション 15.6.2)。サーバーは [RFC7807] による "problem details" レスポンスで追加情報を提供してもよい(MAY)です。

HTTP/3 におけるストリームのクローズは、[RFC6455] の TCP 接続のクローズに類似しています。整然とした TCP レベルのクローズはストリーム上の FIN ビットとして表されます(RFC 9114 セクション 4.4)。RST 例外はストリームエラー(RFC 9114 セクション 8)として表され、そのタイプは H3_REQUEST_CANCELLED(RFC 9114 セクション 8.1)です。


4. セキュリティに関する考慮事項

本書は、[RFC8441] で議論されているもの以外の新たなセキュリティ考慮事項を導入しません。


5. IANA に関する考慮事項

本書は "HTTP/3 Settings" レジストリ(RFC 9114 セクション 11.2.2)に新しい設定を登録します。

Value:
0x08
Setting Name:
SETTINGS_ENABLE_CONNECT_PROTOCOL
Default:
0
Status:
permanent
Specification:
本書
Change Controller:
IETF
Contact:
HTTP Working Group (ietf-http-wg@w3.org)

6. 規範的参考文献

[HTTP]
Fielding, R., Ed., Nottingham, M., Ed., and J. Reschke, Ed., “HTTP Semantics”, STD 97, RFC 9110, DOI 10.17487/RFC9110, June 2022, <https://www.rfc-editor.org/info/rfc9110>.
[HTTP/2]
Thomson, M., Ed. and C. Benfield, Ed., “HTTP/2”, RFC 9113, DOI 10.17487/RFC9113, June 2022, <https://www.rfc-editor.org/info/rfc9113>.
[HTTP/3]
Bishop, M., Ed., “HTTP/3”, RFC 9114, DOI 10.17487/RFC9114, June 2022, <https://www.rfc-editor.org/info/rfc9114>.
[RFC2119]
Bradner, S., “Key words for use in RFCs to Indicate Requirement Levels”, BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997, <https://www.rfc-editor.org/info/rfc2119>.
[RFC6455]
Fette, I. and A. Melnikov, “The WebSocket Protocol”, RFC 6455, DOI 10.17487/RFC6455, December 2011, <https://www.rfc-editor.org/info/rfc6455>.
[RFC7807]
Nottingham, M. and E. Wilde, “Problem Details for HTTP APIs”, RFC 7807, DOI 10.17487/RFC7807, March 2016, <https://www.rfc-editor.org/info/rfc7807>.
[RFC8174]
Leiba, B., “Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words”, BCP 14, RFC 8174, DOI 10.17487/RFC8174, May 2017, <https://www.rfc-editor.org/info/rfc8174>.
[RFC8441]
McManus, P., “Bootstrapping WebSockets with HTTP/2”, RFC 8441, DOI 10.17487/RFC8441, September 2018, <https://www.rfc-editor.org/info/rfc8441>.

謝辞

本書は IETF の HTTP および QUIC ワーキンググループの多くの寄稿者によるレビューと入力を受けており、David Schinazi、Martin Thomson、Lucas Pardue、Mike Bishop、Dragana Damjanovic、Mark Nottingham、Julian Reschke から実質的な入力がありました。


著者の連絡先

Ryan Hamilton
Google
EMail: rch@google.com