From 63a70fabeb3f667ec0cabc5d43a124e158faa2c0 Mon Sep 17 00:00:00 2001 From: Tommy Pauly Date: Tue, 15 Oct 2024 07:55:08 -0700 Subject: [PATCH 1/3] Reference incremental header, provide example Closes #19 Closes #20 --- draft-ietf-ohai-chunked-ohttp.md | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/draft-ietf-ohai-chunked-ohttp.md b/draft-ietf-ohai-chunked-ohttp.md index 0dcbe0d..2fb6c4c 100644 --- a/draft-ietf-ohai-chunked-ohttp.md +++ b/draft-ietf-ohai-chunked-ohttp.md @@ -41,7 +41,7 @@ that process messages slowly. # Introduction -Oblivious HTTP {{!OHTTP=I-D.ietf-ohai-ohttp}} defines a system for sending HTTP requests +Oblivious HTTP {{!OHTTP=RFC9458}} defines a system for sending HTTP requests and responses as encrypted messages. Clients send requests via a relay to a gateway, which is able to decrypt and forward the request to a target server. Responses are encrypted with an ephemeral symmetric key by the gateway and sent back to the client via the relay. @@ -99,12 +99,32 @@ for a proxied TLS session. Notational conventions from {{OHTTP}} are used in this document. -# Chunked Request and Response Media Types +# Chunked Requests and Responses Chunked Oblivious HTTP defines different media than the non-chunked variant. These media types are "message/ohttp-chunked-req" (defined in {{iana-req}}) and "message/ohttp-chunked-res" (defined in {{iana-res}}). +Additionally, Chunked OHTTP requests and responses SHOULD include the +`Incremental` header field {{!INCREMENTAL=I-D.kazuho-httpbis-incremental-http}} +in order to signal to intermediaries (such as the relay) that the content of +the messages are intended to be delivered incrementally. Without this signal, +intermediaries might buffer request or response body until complete, removing +the benefits of using Chunked OHTTP. + +Chunked OHTTP messages generally will not include a `Content-Length` header field, +since the complete length of all chunks might not be known ahead of time. + +For example, a Chunked OHTTP request could look like the following: +~~~ +POST /request.example.net/proxy HTTP/1.1 +Host: proxy.example.org +Content-Type: message/ohttp-chunked-req +Incremental: ?1 + + +~~~ + # Request Format {#request} Chunked OHTTP requests start with the same header as used for the non-chunked variant, From 46dedd4028b884dd8337d5dbf44dcc151b1462d0 Mon Sep 17 00:00:00 2001 From: Martin Thomson Date: Wed, 16 Oct 2024 09:00:49 +1100 Subject: [PATCH 2/3] Fixed it for you --- draft-ietf-ohai-chunked-ohttp.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/draft-ietf-ohai-chunked-ohttp.md b/draft-ietf-ohai-chunked-ohttp.md index 2fb6c4c..ba1e4e4 100644 --- a/draft-ietf-ohai-chunked-ohttp.md +++ b/draft-ietf-ohai-chunked-ohttp.md @@ -116,7 +116,8 @@ Chunked OHTTP messages generally will not include a `Content-Length` header fiel since the complete length of all chunks might not be known ahead of time. For example, a Chunked OHTTP request could look like the following: -~~~ + +~~~ http-message POST /request.example.net/proxy HTTP/1.1 Host: proxy.example.org Content-Type: message/ohttp-chunked-req From b55648da249f717ac1824233d2dcf8eb4fed4e49 Mon Sep 17 00:00:00 2001 From: Tommy Pauly Date: Fri, 18 Oct 2024 19:37:39 -0700 Subject: [PATCH 3/3] Apply suggestions from code review Co-authored-by: Martin Thomson --- draft-ietf-ohai-chunked-ohttp.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/draft-ietf-ohai-chunked-ohttp.md b/draft-ietf-ohai-chunked-ohttp.md index ba1e4e4..abd3c12 100644 --- a/draft-ietf-ohai-chunked-ohttp.md +++ b/draft-ietf-ohai-chunked-ohttp.md @@ -105,7 +105,7 @@ Chunked Oblivious HTTP defines different media than the non-chunked variant. The media types are "message/ohttp-chunked-req" (defined in {{iana-req}}) and "message/ohttp-chunked-res" (defined in {{iana-res}}). -Additionally, Chunked OHTTP requests and responses SHOULD include the +Chunked OHTTP requests and responses SHOULD include the `Incremental` header field {{!INCREMENTAL=I-D.kazuho-httpbis-incremental-http}} in order to signal to intermediaries (such as the relay) that the content of the messages are intended to be delivered incrementally. Without this signal,