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
I am writing a filter that can inject some data into body even it's a header-only request.
I have tried call addDecodedData in decodeHeader() to add some data, but decodeData() has not been called later in the same filter. It seems that this will only take effect in subsequent filters.
I try addDecodeData in decodeHeader() look like this.
if(end_stream){
// for header-only request, add an empty body frame to trigger decodeData()
Envoy::Buffer::OwnedImpl buffer{"mark"};
decoder_callbacks_->addDecodedData(buffer, true);
}
return Http::FilterHeadersStatus::StopIteration;
I'm not sure if my understanding of addDecodedData is correct. Maybe I should add data in the previous filter and then my custom filter will invoke decodeData? Is there any way to invoke decodeData in the same filter?
The text was updated successfully, but these errors were encountered:
I am writing a filter that can inject some data into body even it's a header-only request.
I have tried call addDecodedData in decodeHeader() to add some data, but decodeData() has not been called later in the same filter. It seems that this will only take effect in subsequent filters.
I try addDecodeData in decodeHeader() look like this.
I'm not sure if my understanding of addDecodedData is correct. Maybe I should add data in the previous filter and then my custom filter will invoke decodeData? Is there any way to invoke decodeData in the same filter?
The text was updated successfully, but these errors were encountered: