Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compare content-length to the length of the request body #188

Merged
merged 1 commit into from
May 8, 2024

Conversation

stephenfrank
Copy link
Contributor

Content-Length should be compared to the length of the request body otherwise bufferLength() includes the length of the headers and body

@taylorotwell taylorotwell requested a review from joedixon May 7, 2024 13:18
@joedixon joedixon marked this pull request as draft May 7, 2024 13:35
@joedixon joedixon marked this pull request as ready for review May 8, 2024 10:03
@joedixon
Copy link
Collaborator

joedixon commented May 8, 2024

I've tested this locally and, although I can't replicate the issue as I my requests are never never chunked, it does seem to resolve the issue if/when that does occur.

In short, our current check to determine whether the request size matches the expected content-length includes all headers rather than just the body.

@taylorotwell taylorotwell merged commit d5783a3 into laravel:main May 8, 2024
11 checks passed
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.

3 participants