docs/root/faq/extensions/contract.rst
.. _faq_filter_contract:
Headers encoding/decoding
During encoding/decoding of headers if a local reply wasn't sent and a filter
returns FilterHeadersStatus::StopIteration, the processing can be resumed
if encodeData()/decodeData() return
FilterDataStatus::Continue or by explicitly calling
continueEncoding()/continueDecoding().
During encoding/decoding of headers if a local reply wasn't sent and a filter returns
FilterHeadersStatus::StopAllIterationAndBuffer or
FilterHeadersStatus::StopAllIterationAndWatermark, the processing can be resumed by calling
continueEncoding()/continueDecoding().
A filter's decodeHeaders() implementation must not return
FilterHeadersStatus::ContinueAndDontEndStream when called with end_stream set to false. In this case
FilterHeadersStatus::Continue should be returned.
A filter's encode1xxHeaders() must return Filter1xxHeadersStatus::Continue or
Filter1xxHeadersStatus::StopIteration.
Data encoding/decoding
FilterDataStatus::StopIterationAndBuffer, FilterDataStatus::StopIterationAndWatermark,
or FilterDataStatus::StopIterationNoBuffer, the processing can be resumed if
encodeData()/decodeData() return FilterDataStatus::Continue or by explicitly
calling continueEncoding()/continueDecoding().Trailers encoding/decoding
FilterTrailersStatus::StopIteration,
the processing can be resumed by explicitly calling continueEncoding()/continueDecoding().decodeHeaders()?The first filter of the decoding filter chain will have the following headers in the map:
HostPath (this might be omitted for CONNECT requests).Although these headers may be omitted by one of the filters on the decoding filter chain, they should be reinserted before the terminal filter is triggered.