Skip to content

fix: enforce configured non-multipart payload limits - #1451

Draft
pvarshh wants to merge 1 commit into
sparckles:mainfrom
pvarshh:codex/limit-request-payload-1425
Draft

pvarshh wants to merge 1 commit into
sparckles:mainfrom
pvarshh:codex/limit-request-payload-1425

Conversation

@pvarshh

@pvarshh pvarshh commented Oct 9, 2026

Copy link
Copy Markdown

Description

Fixes #1425. Non-multipart bodies now use Actix's Bytes extractor, which enforces the existing PayloadConfig for both Content-Length and chunked requests. Stream errors propagate instead of panicking. The request parser's HTTP error status is preserved, with a generic reason phrase in the response body.

Summary

A body over ROBYN_MAX_PAYLOAD_SIZE now receives HTTP 413; a body exactly at the limit remains accepted. Malformed chunked input receives HTTP 400, and the worker still serves a subsequent valid request. Multipart buffering is unchanged; parser errors from either branch retain their Actix status instead of being converted to 500.

Added 15 live-server integration cases covering empty, below-limit, exact-limit, and oversized text/JSON/binary bodies, chunked boundaries, and malformed transfer recovery. These tests were frozen before implementation: 5 failed and 10 passed on base 1170748; all 15 now pass.

Validation on macOS / Python 3.12.13 / Rust 1.99.0:

  • maturin develop --extras all and all 555 Python integration/unit tests pass. Existing suite ran from a temporary copy with only its 8080/8081 port literals remapped to free ports, preserving an unrelated local listener. The focused 15 tests also pass unchanged in this checkout.
  • cargo check, cargo test (0 Rust tests), cargo fmt --check, and cargo clippy pass. Existing Rust warnings remain.
  • Normal pre-commit hooks and git diff --check pass. Upstream Nox bootstrap and platform CI remain to be verified.

AI assistance was used: Nodus-hosted openai/gpt-oss-120b supplied a draft from a researched prompt; Codex authored the independent tests, reviewed/corrected the draft, and performed local validation. Graphify query Request from_actix_request PayloadConfig error status traced the request parser to the server's response conversion; verified those source paths and refreshed the graph after edits.

PR Checklist

  • The PR contains a descriptive title
  • The PR contains a descriptive summary of the changes
  • You build and test your changes before submitting a PR.
  • You have added relevant documentation
  • You have added relevant tests. We prefer integration tests wherever possible

Pre-Commit Instructions

  • Ensure that you have run the pre-commit hooks on your PR.

@vercel

vercel Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
robyn Error Error Oct 9, 2026 8:20pm UTC

@coderabbitai

coderabbitai Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

This branch had an error being deployed

1 failed deployment
Preview — f15a39a1 Deployed Oct 9, 2026 by vercel[bot]
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.

Non-multipart request bodies ignore ROBYN_MAX_PAYLOAD_SIZE and a stream error panics the worker

1 participant