Skip to content

fix: add content-length on request body transformation#818

Merged
mathetake merged 2 commits intomainfrom
content-length
Jul 2, 2025
Merged

fix: add content-length on request body transformation#818
mathetake merged 2 commits intomainfrom
content-length

Conversation

@mathetake
Copy link
Member

@mathetake mathetake commented Jul 2, 2025

Description

We use REPLACE_AND_CONTINUE in the request header phase on the upstream extproc filter. However, the current extproc implementation removes the content-length header unconditionally when body mutation happens with REPLACE_AND_CONTINUE flag.

This adds a workaround of that limitation by inserting the header mutation filter after the upstream extproc filter where we retrieve the content-length from a dynamic metadata.

Related Issues/PRs (if applicable)

Fixes the issue that the #730 resolves in different way

Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
@mathetake mathetake changed the title fix: add content-length header on request body transformation fix: add content-length on request body transformation Jul 2, 2025
Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
@mathetake mathetake marked this pull request as ready for review July 2, 2025 19:19
@mathetake mathetake requested a review from a team as a code owner July 2, 2025 19:19
@mathetake mathetake merged commit 8bde34c into main Jul 2, 2025
54 of 56 checks passed
@mathetake mathetake deleted the content-length branch July 2, 2025 21:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants