Skip to content

fix(protocol): re-run request-body filters on each upstream attempt - #1162

Open
Aman-Cool wants to merge 1 commit into
praxis-proxy:mainfrom
Aman-Cool:fix/retry-rerun-request-body-filters
Open

fix(protocol): re-run request-body filters on each upstream attempt#1162
Aman-Cool wants to merge 1 commit into
praxis-proxy:mainfrom
Aman-Cool:fix/retry-rerun-request-body-filters

Conversation

@Aman-Cool

@Aman-Cool Aman-Cool commented Sep 12, 2026

Copy link
Copy Markdown

Fixes #1146.

body_done marks are per-request, so from the second retry onward the
request-body filters were skipped and the replayed body went upstream
unfiltered.., under a Content-Length that still described the rewritten one.

Clears the request-body marks per attempt in upstream_request_filter, right
next to apply_mutated_content_length, so the two can't drift apart. Full
write-up of how it was found is in the issue.

Regression test covers shrinking and growing rewrites, a single retry, and a
ReadOnly control.

Checklist

  • Signed off all commits (git commit -s)
  • Tests added or updated
  • Documentation updated (if applicable)
  • make lint && make test && make test-integration passes locally

Does this introduce a breaking change?

No. FilterPipeline::clear_request_body_done is additive.

@Aman-Cool
Aman-Cool requested review from a team September 12, 2026 17:50
@Aman-Cool
Aman-Cool requested a review from shaneutt as a code owner September 12, 2026 17:50
@praxis-bot-app

Copy link
Copy Markdown

Unsigned commits: 7a7d878. Please sign your commits.

@Aman-Cool
Aman-Cool force-pushed the fix/retry-rerun-request-body-filters branch from 282f87b to 66d90b7 Compare September 12, 2026 18:13
body_done marks are per-request, so a filter that finished on one
attempt was skipped on the next: the replayed body went upstream
unfiltered under a Content-Length describing the rewritten one.

Fixes praxis-proxy#1146

Signed-off-by: Aman-Cool <aman017102007@gmail.com>
@Aman-Cool
Aman-Cool force-pushed the fix/retry-rerun-request-body-filters branch from 66d90b7 to 04f2c1b Compare September 12, 2026 18:58
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.

Request-body filters stop re-running after the second retry, so a rewritten body reaches the upstream unfiltered

1 participant