From 0cdacf03e476235ac34807c128542cea4de39661 Mon Sep 17 00:00:00 2001 From: "update-envoy[bot]" <135279899+update-envoy[bot]@users.noreply.github.com> Date: Thu, 2 Nov 2023 13:42:48 +0000 Subject: [PATCH] Mirrored from envoyproxy/envoy @ 3b212640c485d91965cfed625e7fd4c52c3d905d Signed-off-by: update-envoy[bot] <135279899+update-envoy[bot]@users.noreply.github.com> --- envoy/COMMIT | 2 +- .../http/ext_proc/v3/processing_mode.pb.go | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/envoy/COMMIT b/envoy/COMMIT index b282d06cd7..55413ef75b 100644 --- a/envoy/COMMIT +++ b/envoy/COMMIT @@ -1 +1 @@ -528c4752324df60fea76ec93d411710130920e5c +3b212640c485d91965cfed625e7fd4c52c3d905d diff --git a/envoy/extensions/filters/http/ext_proc/v3/processing_mode.pb.go b/envoy/extensions/filters/http/ext_proc/v3/processing_mode.pb.go index 0697f79c8a..0e60c6c51c 100755 --- a/envoy/extensions/filters/http/ext_proc/v3/processing_mode.pb.go +++ b/envoy/extensions/filters/http/ext_proc/v3/processing_mode.pb.go @@ -78,6 +78,22 @@ func (ProcessingMode_HeaderSendMode) EnumDescriptor() ([]byte, []int) { } // Control how the request and response bodies are handled +// When body mutation by external processor is enabled, ext_proc filter will always remove +// the content length header in three cases below because content length can not be guaranteed +// to be set correctly: +// 1) STREAMED BodySendMode: header processing completes before body mutation comes back. +// 2) BUFFERED_PARTIAL BodySendMode: body is buffered and could be injected in different phases. +// 3) BUFFERED BodySendMode + SKIP HeaderSendMode: header processing (e.g., update content-length) is skipped. +// +// In Envoy's http1 codec implementation, removing content length will enable chunked transfer +// encoding whenever feasible. The recipient (either client or server) must be able +// to parse and decode the chunked transfer coding. +// (see `details in RFC9112 `_). +// +// In BUFFERED BodySendMode + SEND HeaderSendMode, content length header is allowed but it is +// external processor's responsibility to set the content length correctly matched to the length +// of mutated body. If they don't match, the corresponding body mutation will be rejected and +// local reply will be sent with an error message. type ProcessingMode_BodySendMode int32 const (