You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
wasm: add config setting to control StopIteration behavior (#40213)
Add PluginConfig.allow_on_headers_stop_iteration config field to control
the behavior of WasmFilter when plugin onRequestHeaders and
onResponseHeaders callbacks return a value of
FilterHeadersStatus::StopIteration.
If allow_on_headers_stop_iteration is false (the default), then in cases
where a Wasm plugin onRequestHeaders or onResponseHeaders callback
returns FilterHeadersStatus::StopIteration, WasmFilter will maintain its
current behavior of translating that response code to
FilterHeadersStatus::StopAllIterationAndWatermark.
If allow_on_headers_stop_iteration is true, then WasmFilter will avoid
any translation of FilterHeadersStatus::StopIteration, and will pass it
through to HCM unmodified, which allows Wasm plugins to inspect request
or response body data before deciding how to handle/transform request or
response headers.
For details, see [Envoy Wasm / Proxy-Wasm support for
FilterHeadersStatus::StopIteration](https://docs.google.com/document/d/1Whd1C0k-H2NHrPOmlAqqauFz6ObSTP017juJIYyciB0/edit?usp=sharing).
This PR implements [Option B: WasmFilter config
knob](https://docs.google.com/document/d/1Whd1C0k-H2NHrPOmlAqqauFz6ObSTP017juJIYyciB0/edit?tab=t.0#bookmark=id.5wxldlapsp54),
building on proxy-wasm/proxy-wasm-cpp-host#434.
Note that this config knob is a stopgap until upcoming v0.3.0 of the
Proxy-Wasm ABI adds more comprehensive support for StopIteration and
body buffering, per proxy-wasm/spec#63.
Additional Description:
This change updates the proxy-wasm-cpp-host dependency since it depends
on proxy-wasm/proxy-wasm-cpp-host#434, which was
recently merged there.
Signed-off-by: Michael Warres <mpw@google.com>
Mirrored from https://github.com/envoyproxy/envoy @ 274d68f02971c1cf0da1628991126e8ebd307d25
0 commit comments