Skip to content

fix(response): implement BoundedResponseBodyReader so body return patterns evaluate - #26

Merged
rennf93 merged 1 commit into
masterfrom
fix/body-return-pattern
Oct 17, 2026
Merged

rennf93 merged 1 commit into
masterfrom
fix/body-return-pattern

Conversation

@rennf93

@rennf93 rennf93 commented Oct 17, 2026

Copy link
Copy Markdown
Member

Closes #25

I made KtorGuardResponse implement BoundedResponseBodyReader, returning a bounded prefix of the materialized body (empty when a streaming body was left unread), the same contract as the Python reference (guard/adapters.py:131-152). The test routes a body return_pattern rule with a one occurrence threshold and expects the ban on the third request; it fails on master with 200 instead of 403 and passes now. The full gate (spotlessApply, detekt, build with Redis) is green locally: 38 tests, 0 failed.

@github-actions github-actions Bot added the documentation Docs site, README, CHANGELOG, license files label Oct 17, 2026
@rennf93
rennf93 merged commit 72442f7 into master Oct 17, 2026
8 checks passed
@rennf93
rennf93 deleted the fix/body-return-pattern branch October 17, 2026 03:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Docs site, README, CHANGELOG, license files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Body based return_pattern behavior rules never evaluate

1 participant