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

Fix reader not skipping over all CRLF #241

Merged
merged 4 commits into from
Feb 2, 2025

Conversation

thatstoasty
Copy link
Collaborator

@thatstoasty thatstoasty commented Feb 1, 2025

From my message in Discord:

We should check if content-length > 0 before trying to read the body, and we should also skip any leading \r\n before reading the body. There was a leading \r\n that consumed 2 bytes that was expected in the body itself

@thatstoasty thatstoasty requested a review from saviorand February 1, 2025 19:53
README.md Show resolved Hide resolved
@saviorand
Copy link
Collaborator

Looks good, also appreciate the unit test! Made one small tweak to server logic so the user actually sees the errors in dev when we throw internal server error, see resolved comments.
Merging now and shipping a new release

@saviorand saviorand merged commit 0cbb77b into Lightbug-HQ:main Feb 2, 2025
3 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.

2 participants