Skip to content

feat(validators): clarify error when content-length is missing#2119

Open
SAY-5 wants to merge 1 commit into
spec-first:mainfrom
SAY-5:improve-content-length-error
Open

feat(validators): clarify error when content-length is missing#2119
SAY-5 wants to merge 1 commit into
spec-first:mainfrom
SAY-5:improve-content-length-error

Conversation

@SAY-5

@SAY-5 SAY-5 commented May 13, 2026

Copy link
Copy Markdown

Fixes #2020.

Changes proposed in this pull request:

  • Replace the "RequestBody is required" 400 message with "RequestBody is empty or the Content-Length header is missing or zero", so callers can tell their client omitted Content-Length rather than actually sending an empty body.

@SAY-5

SAY-5 commented May 25, 2026

Copy link
Copy Markdown
Author

@pre-commit-ci run

@SAY-5

SAY-5 commented May 25, 2026

Copy link
Copy Markdown
Author

Note: the pre-commit.ci failure is a pre-existing upstream issue - the same hook also fails on the spec-first/connexion main branch itself (not related to this change). All hooks pass locally.

@SAY-5

SAY-5 commented May 25, 2026

Copy link
Copy Markdown
Author

@pre-commit-ci run

Signed-off-by: Sai Asish Y <say.apm35@gmail.com>
@SAY-5 SAY-5 force-pushed the improve-content-length-error branch from 7a74b79 to a095e2d Compare June 2, 2026 20:53
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.

Incorrect error response when content-length header is missing

1 participant