-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Open
Labels
questionQuestions that are neither investigations, bugs, nor enhancementsQuestions that are neither investigations, bugs, nor enhancements
Description
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?
Metadata
Metadata
Assignees
Labels
questionQuestions that are neither investigations, bugs, nor enhancementsQuestions that are neither investigations, bugs, nor enhancements