Open Octopus409 opened 1 month ago
decodeData by design is invoked for body. i.e., not for header only request
decodeData by design is invoked for body. i.e., not for header only request
thanks for your comment, you are right, invoke decodeData in a header only request is bit weird.
https://github.com/envoyproxy/envoy/blob/ee6163435be32f0efd3ad068e90ea89c974991c3/envoy/http/filter.h#L588 but I found this note in the decoder callback, which seems to support this special requirement.
That is for subsequent filter not for the same filter
This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or "no stalebot" or other activity occurs. Thank you for your contributions.
这是来自QQ邮箱的假期自动回复邮件。 您好,我最近正在休假中,无法亲自回复您的邮件。我将在假期结束后,尽快给您回复。
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?