Is there a contract my HTTP filter must adhere to?
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 ifencodeData()
/decodeData()
returnFilterDataStatus::Continue
or by explicitly callingcontinueEncoding()
/continueDecoding()
.During encoding/decoding of headers if a local reply wasn’t sent and a filter returns
FilterHeadersStatus::StopAllIterationAndBuffer
orFilterHeadersStatus::StopAllIterationAndWatermark
, the processing can be resumed by callingcontinueEncoding()
/continueDecoding()
.A filter’s
decodeHeaders()
implementation must not returnFilterHeadersStatus::ContinueAndDontEndStream
when called withend_stream
set to false. In this caseFilterHeadersStatus::Continue
should be returned.A filter’s
encode1xxHeaders()
must returnFilterHeadersStatus::Continue
orFilterHeadersStatus::StopIteration
.
Data encoding/decoding
During encoding/decoding of data if a local reply wasn’t sent and a filter returns
FilterDataStatus::StopIterationAndBuffer
,FilterDataStatus::StopIterationAndWatermark
, orFilterDataStatus::StopIterationNoBuffer
, the processing can be resumed ifencodeData()
/decodeData()
returnFilterDataStatus::Continue
or by explicitly callingcontinueEncoding()
/continueDecoding()
.
Trailers encoding/decoding
During encoding/decoding of trailers if a local reply wasn’t sent and a filter returns
FilterTrailersStatus::StopIteration
, the processing can be resumed by explicitly callingcontinueEncoding()
/continueDecoding()
.
Are there well-known headers that will appear in the given headers map of decodeHeaders()
?
The first filter of the decoding filter chain will have the following headers in the map:
Host
Path
(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.