ext_proc: Support CONTINUE_AND_REPLACE from header callbacks (#16437)

This makes it possible for a processor to add a body to a request or response that does
not have one, or replace the entire body in the response from a header callback
without otherwise touching it.

Signed-off-by: Gregory Brail <gregbrail@google.com>

Mirrored from https://github.com/envoyproxy/envoy @ c307494627e6f52154c3437fc7aea4c47dce07f0
pull/624/head
data-plane-api(Azure Pipelines) 4 years ago
parent b4dff134c1
commit b8df040452
  1. 21
      envoy/service/ext_proc/v3alpha/external_processor.proto

@ -231,15 +231,18 @@ message CommonResponse {
// stream as normal. This is the default. // stream as normal. This is the default.
CONTINUE = 0; CONTINUE = 0;
// [#not-implemented-hide:] // Apply the specified header mutation, replace the body with the body
// Replace the request or response with the contents // specified in the body mutation (if present), and do not send any
// of this message. If header_mutation is set, apply it to the // further messages for this request or response even if the processing
// headers. If body_mutation is set and contains a body, then add that // mode is configured to do so.
// body to the request or response, even if one does not already exist -- //
// otherwise, clear the body. Any additional body and trailers // When used in response to a request_headers or response_headers message,
// received from downstream or upstream will be ignored. // this status makes it possible to either completely replace the body
// This can be used to add a body to a request or response that does not // while discarding the original body, or to add a body to a message that
// have one already. // formerly did not have one.
//
// In other words, this response makes it possible to turn an HTTP GET
// into a POST, PUT, or PATCH.
CONTINUE_AND_REPLACE = 1; CONTINUE_AND_REPLACE = 1;
} }

Loading…
Cancel
Save