Skip to content

Test check_body_limit Content-Length branches - #97

Open
Herklos wants to merge 1 commit into
masterfrom
cursor/body-limit-unit-tests-fac5
Open

Herklos wants to merge 1 commit into
masterfrom
cursor/body-limit-unit-tests-fac5

Conversation

@Herklos

@Herklos Herklos commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add direct unit tests for the Python check_body_limit Content-Length branches.
  • A missing header is allowed. Non-numeric and negative headers return 400 Invalid Content-Length. A length equal to the cap is allowed. A length above the cap returns 413 Payload too large.
  • No production code change. Status codes and error strings stay as they are.

Test plan

  • cd packages/python/server && uv run --python 3.12 --extra dev pytest tests/router/test_body_limit.py -v (6 passed)
Open in Web Open in Cursor 

Pin the Python body-size guard for a missing, non-numeric, negative,
equal, and over-limit Content-Length without changing the responses.

Co-authored-by: herklos.dev <herklos.dev@protonmail.com>

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Content-Length cases match the current guard: a missing header is allowed, a non-numeric or negative header is 400, a length equal to the cap is allowed, and a length above the cap is 413. One changelog placement note is inline.

Open in Web View Automation 

Sent by Cursor Automation: Review

Comment thread CHANGELOG.md
### Changed
- **README**: package count corrected to 33 (lockstep TS + Python families, including TypeScript-only `webhook` and `events`).

### Added

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This new heading sits directly above the existing isolated-tier paragraph, so that paragraph now reads as part of the test note. Place this subsection after that paragraph so the two stay separate.

@Herklos Herklos self-assigned this Oct 13, 2026

This branch has not been deployed

No deployments
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