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

Handle malformed request path #3155

Merged
merged 1 commit into from May 14, 2023
Merged

Handle malformed request path #3155

merged 1 commit into from May 14, 2023

Conversation

dentarg
Copy link
Member

@dentarg dentarg commented May 14, 2023

Description

Bad Request is returned

$ printf 'GET :/ HTTP/1.1\r\n\r\n' | nc localhost 8080
HTTP/1.1 400 Bad Request

and it is logged like this

2023-05-14 11:54:28 +0200 HTTP parse error, malformed request ("GET " - (-)): #<Puma::HttpParserError: Puma::HttpParserError>

Close #3148

Your checklist for this pull request

  • I have reviewed the guidelines for contributing to this repository.
  • I have added (or updated) appropriate tests if this PR fixes a bug or adds a feature.
  • My pull request is 100 lines added/removed or less so that it can be easily reviewed.
  • If this PR doesn't need tests (docs change), I added [ci skip] to the title of the PR.
  • If this closes any issues, I have added "Closes #issue" to the PR description or my commit messages.
  • I have updated the documentation accordingly.
  • All new and existing tests passed, including Rubocop.

@dentarg dentarg merged commit 28db9e6 into puma:master May 14, 2023
64 checks passed
@dentarg dentarg deleted the bad-path-400 branch May 14, 2023 14:03
MSP-Greg added a commit to MSP-Greg/puma that referenced this pull request May 14, 2023
@MSP-Greg
Copy link
Member

Re History.md, this should probably be labeled one of 'feature', 'bug', or 'refactor'.

Any thoughts?

@dentarg dentarg added the bug label May 15, 2023
@dentarg
Copy link
Member Author

dentarg commented May 15, 2023

bug

MSP-Greg added a commit to MSP-Greg/puma that referenced this pull request May 17, 2023
MSP-Greg added a commit to MSP-Greg/puma that referenced this pull request May 18, 2023
MSP-Greg added a commit to MSP-Greg/puma that referenced this pull request May 21, 2023
MSP-Greg added a commit to MSP-Greg/puma that referenced this pull request May 23, 2023
MSP-Greg added a commit to MSP-Greg/puma that referenced this pull request May 27, 2023
MSP-Greg added a commit to MSP-Greg/puma that referenced this pull request May 29, 2023
MSP-Greg added a commit to MSP-Greg/puma that referenced this pull request Jun 1, 2023
MSP-Greg added a commit to MSP-Greg/puma that referenced this pull request Jun 6, 2023
MSP-Greg added a commit to MSP-Greg/puma that referenced this pull request Jun 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Request with malformed path raises URI::InvalidURIError
2 participants