Skip to content

Dynamic modules are unable to add response trailers if the incoming response has no trailers #42559

@zakhenry

Description

@zakhenry

Title: Dynamic modules are unable to add response trailers if the incoming response has no trailers

Description:

In a dynamic module, calls to envoy_filter.set_response_trailer(...) fail (no trailer set, function returns false) if either the incoming response has no trailers to begin with (e.g. an http/1.1 response), or the call is made before trailer parsing has occurred (e.g. in on_response_body hook).

Repro steps:

  1. Set up a dynamic module filtering a request that is made with http/2 (e.g. grpc) but the upstream cluster responds with http/1.1
  2. in on_response_body attempt to set a trailer
  3. see that the call returns false and no trailers are set.

I'll set up a minimal repro when I get a chance, just noting the current state so I can link my PR to an issue

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions