HTTP: add more control over buffering and/or offloading processing to the host
Currently, we only support Continue and Pause actions, which is quite limiting.
Most notably, we require forwarding HTTP headers before processing HTTP body, which prevents building plugins that perform authorization based on contents of HTTP request body or completely consume requests and generate responses from within plugin (for which proxy_send_local_response is too limited).
Refs:
- https://github.com/proxy-wasm/proxy-wasm-cpp-host/pull/95
- https://github.com/proxy-wasm/proxy-wasm-cpp-host/issues/143
- https://github.com/proxy-wasm/proxy-wasm-cpp-host/issues/367
- https://github.com/proxy-wasm/proxy-wasm-cpp-host/issues/417
Another use case is to decide whether buffer or not based on headers e.g. in Coraza WAF we only want to buffer and inspect body if certain content type.
I put together a doc that consolidates information about this issue and evaluates options: Envoy Wasm / Proxy-Wasm support for FilterHeadersStatus::StopIteration
tl;dr is that I think we should define a v0.2.2 ABI minor revision that fixes this issue (only), decoupling this from other fixes targeted for the v0.3 ABI.