Open tkuramot opened 6 months ago
RFC 9112は、インターネット標準トラックの一部として、HTTP/1.1プロトコルの仕様を定義しています。この文書は、Web通信の基礎となるプロトコルのバージョン1.1に関する詳細な定義とガイドラインを提供し、メッセージの形式、接続の管理、エラーハンドリングなどをカバーしています。HTTP/1.1は、Webページのリクエストと配信に広く利用されており、インターネット上での情報交換の効率と信頼性を高めることを目的としています。関連するRFCには、RFC 7230(HTTP/1.1メッセージ構文とルーティング)、RFC 7231(HTTP/1.1セマンティクスとコンテンツ)、RFC 7232(HTTP/1.1条件付きリクエスト)、RFC 7233(HTTP/1.1レンジリクエスト)、RFC 7234(HTTP/1.1キャッシング)などがあります。RFC 9112はこれらのRFCを置き換え、HTTP/1.1に関する最新の標準を提供します。
HTTP-message = start-line CRLF *( field-line CRLF ) CRLF [ message-body ]
[x] A recipient MUST parse an HTTP message as a sequence of octets in an encoding that is a superset of US-ASCII [USASCII]. 受信者は、US-ASCII [USASCII]のスーパーセットであるエンコードのオクテットのシーケンスとしてHTTPメッセージを解析する必要があります。
encoding: データを一定の規則に従って目的の情報に変換すること(符号化)
octet: 8ビット
[x] A sender MUST NOT generate a bare CR (a CR character not immediately followed by LF) within any protocol elements other than the content. A recipient of such a bare CR MUST consider that element to be invalid or replace each bare CR with SP before processing the element or forwarding the message. 送信者は、コンテンツ以外のプロトコル要素内で、むき出しのCR(すぐにLFが続きません)を生成してはなりません。そのような場合、受信側は、処理したりメッセージを転送 する前に、そのエレメントは無効であるとみなすか、各ベアCRをSPに置き換えなけれ ばならない(MUST)。
FL:改行(\r\n)のこと
[x] HTTP/1.1 user agent MUST NOT preface or follow a request with an extra CRLF. HTTP/1.1ユーザーエージェントはリクエストの前に余分なCRLFをつけてはならない
user agent : 「ネット利用者が使用しているOS・ブラウザ」のこと
[x] If terminating the request message body with a line-ending is desired, then the user agent MUST count the terminating CRLF octets as part of the message body length. リクエストメッセージボディを行末で終了することが望まれる場合、ユー ザーエージェントは行末のCRLFオクテットをメッセージボディの長さの 一部として数えなければならない[MUST]。
バイナリデータを送信する場合は、CRLFを含める必要なし
[x] A sender MUST NOT send whitespace between the start-line and the first header field. 送信者はスタートラインとヘッダーの間に空白行を送ってはいけない。
start-line : リクエストライン、もしくはステータスラインのこと
[x] A recipient that receives whitespace between the start-line and the first header field MUST either reject the message as invalid or consume each whitespace-preceded line without further processing of it (i.e., ignore the entire line, along with any subsequent lines preceded by whitespace, until a properly formed header field is received or the header section is terminated). 開始行と最初のヘッダーフィールドの間に空白を受け取る受信者は、そのメッセー ジを無効として拒否するか、空白で先行する各行をそれ以上処理せずに消費しな ければならない[MUST](すなわち、適切に形成されたヘッダーフィールドを受 け取るかヘッダーセクションが終了するまで、空白で先行するそれ以降の行と 共にその行全体を無視する)。
The most common form of request-target is the "origin-form".
origin-form = absolute-path [ "?" query ]
absolute-form = absolute-URI
The "authority-form" of request-target is only used for CONNECT requests (Section 9.3.6 of [HTTP]). It consists of only the uri-host and port number of the tunnel destination, separated by a colon (":").
リクエストターゲットの「権限形式」は、接続要求にのみ使用されます([HTTP]のセクション9.3.6)。これは、コロン( ":")で区切られたトンネルの目的地のURIホストとポート番号のみで構成されています。
authority-form = uri-host ":" port
CONNECT www.example.com:80 HTTP/1.1 Host: www.example.com
The "asterisk-form" of request-target is only used for a server-wide OPTIONS request (Section 9.3.7 of [HTTP]).
asterisk-form = "*"
OPTIONS * HTTP/1.1
OPTIONS http://www.example.org:8001 HTTP/1.1
would be forwarded by the final proxy as
OPTIONS * HTTP/1.1
Host: www.example.org:8001
after connecting to port 8001 of host "www.example.org".
obs-fold = OWS CRLF RWS ; obsolete line folding
message-body = *OCTET
Transfer-Encoding: gzip, chunked
indicates that the content has been compressed using the gzip coding and then chunked using the chunked coding while forming the message body.もしチャンク以外の転送コーディングがレスポンスのコンテンツに適用されている場合、送信者は最終的にチャンクを適用するか、接続を閉じてメッセージを終了しなければなりません。Registrations MUST include the following fields: 登録には、次のフィールドを含める必要があります。
* Name
* 名前
* Description
* 説明
* Pointer to specification text
* 仕様テキストへのポインタ
Names of transfer codings MUST NOT overlap with names of content codings (Section 8.4.1 of [HTTP]) unless the encoding transformation is identical, as is the case for the compression codings defined in Section 7.2. 転送コーディングの名前は、セクション7.2で定義されている圧縮コーディングの場合のように、エンコード変換が同一でない限り、コンテンツコーディングの名前([http]のセクション8.4.1)と重複してはなりません。
[ ] A client MUST NOT send the chunked transfer coding name in TE; chunked is always acceptable for HTTP/1.1 recipients.
Three examples of TE use are below.
米国の3つの例を以下に示します。
TE: deflate
TE:
TE: trailers, deflate;q=0.5
[x] A client that has more than one outstanding request on a connection MUST maintain a list of outstanding requests in the order sent and MUST associate each received response message on that connection to the first outstanding request that has not yet received a final (non-1xx) response.接続に複数の未解決のリクエストを持っているクライアントは、送信された注文の未解決のリクエストのリストを維持する必要があり、最終(非1xx)を受け取っていない最初の未解決のリクエストにその接続に関する各受信応答メッセージを関連付ける必要があります。応答。
[x] If a client receives data on a connection that doesn't have outstanding requests, the client MUST NOT consider that data to be a valid response; the client SHOULD close the connection, since message delimitation is now ambiguous, unless the data consists only of one or more CRLF (which can be discarded per Section 2.2).クライアントが未解決のリクエストを持たない接続に関するデータを受信した場合、クライアントはそのデータを有効な応答と見なしてはなりません。データが1つ以上のCRLFのみで構成されていない限り、メッセージの区切りが曖昧になるため、クライアントは接続を閉じる必要があります(セクション2.2に従って破棄できます)。
HTTP/1.1 defaults to the use of "persistent connections", allowing multiple requests and responses to be carried over a single connection. HTTP implementations SHOULD support persistent connections.
[ ] A client that does not support persistent connections MUST send the "close" connection option in every request message.永続的な接続をサポートしていないクライアントは、すべてのリクエストメッセージに「閉じる」接続オプションを送信する必要があります。
[x] A server that does not support persistent connections MUST send the "close" connection option in every response message that does not have a 1xx (Informational) status code.永続的な接続をサポートしないサーバーは、1xx(情報)ステータスコードがないすべての応答メッセージに「閉じる」接続オプションを送信する必要があります。 A client MAY send additional requests on a persistent connection until it sends or receives a "close" connection option or receives an HTTP/1.0 response without a "keep-alive" connection option. クライアントは、「閉じる」接続オプションを送信または受信するか、「キープアライブ」接続オプションなしでHTTP/1.0応答を受信するまで、永続的な接続に追加のリクエストを送信できます。
[x] In order to remain persistent, all messages on a connection need to have a self-defined message length (i.e., one not defined by closure of the connection), as described in Section 6. A server MUST read the entire request message body or close the connection after sending its response; otherwise, the remaining data on a persistent connection would be misinterpreted as the next request. Likewise, a client MUST read the entire response message body if it intends to reuse the same connection for a subsequent request.セクション6で説明されているように、接続に関するすべてのメッセージが自己定義のメッセージ長(つまり、接続の閉鎖によって定義されていないもの)がある必要があります。応答を送信した後の接続。それ以外の場合、永続的な接続に関する残りのデータは、次のリクエストとして誤解されます。同様に、クライアントは、後続のリクエストのために同じ接続を再利用する予定の場合、応答メッセージ本体全体を読み取る必要があります。
[x] A proxy server MUST NOT maintain a persistent connection with an HTTP/1.0 client (see Appendix C.2.2 for information and discussion of the problems with the Keep-Alive header field implemented by many HTTP/1.0 clients).プロキシサーバーは、HTTP/1.0クライアントとの永続的な接続を維持してはなりません(多くのHTTP/1.0クライアントによって実装されたKEEP-ALIVEヘッダーフィールドの問題の情報と議論については、付録C.2.2を参照)。
A client that supports persistent connections MAY "pipeline" its requests (i.e., send multiple requests without waiting for each response).
The "close" connection option is defined as a signal that the sender will close this connection after completion of the response. A sender SHOULD send a Connection header field (Section 7.6.1 of [HTTP]) containing the "close" connection option when it intends to close a connection. For example,Connection: close
Conceptually, HTTP/TLS is simply sending HTTP messages over a connection secured via TLS [TLS13].
Type name:
message
Subtype name:
http
Required parameters:
N/A
Optional parameters:
version, msgtype
version: The HTTP-version number of the enclosed message (e.g., "1.1"). If not present, the version can be determined from the first line of the body. msgtype: The message type -- "request" or "response". If not present, the type can be determined from the first line of the body. Encoding considerations: only "7bit", "8bit", or "binary" are permitted Security considerations: see Section 11 Interoperability considerations: N/A Published specification: RFC 9112 (see Section 10.1). Applications that use this media type: N/A Fragment identifier considerations: N/A Additional information: Magic number(s): N/A Deprecated alias names for this type: N/A File extension(s): N/A Macintosh file type code(s): N/A Person and email address to contact for further information: See Authors' Addresses section. Intended usage: COMMON Restrictions on usage: N/A Author: See Authors' Addresses section. Change controller: IESG
1. 概要
2. 目的
3. 提案内容
4. タスク