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

HTTP parse error, malformed request () #958

Closed
lalitlogical opened this issue Apr 13, 2016 · 2 comments
Closed

HTTP parse error, malformed request () #958

lalitlogical opened this issue Apr 13, 2016 · 2 comments

Comments

@lalitlogical
Copy link

Rails: 4.2.6 gem 'rails', '~> 4.2.6'
Ruby: ruby-2.1.1
Puma: 2.16 gem 'puma', '~> 2.16'
OS: Mac Yosemite

When I made request with '@' character for searching the user by email, then I am getting this issue.

http://localhost/admin/users?search=%27%%27

Error:

2016-04-13 17:13:43 +0530: HTTP parse error, malformed request (): #<Puma::HttpParserError: Invalid HTTP format, parsing fails.>
2016-04-13 17:13:43 +0530: ENV: {"rack.version"=>[1, 3], "rack.errors"=>#<IO:<STDERR>>, "rack.multithread"=>true, "rack.multiprocess"=>false, "rack.run_once"=>false, "QUERY_STRING"=>"", "SERVER_PROTOCOL"=>"HTTP/1.1", "SERVER_SOFTWARE"=>"2.16.0", "GATEWAY_INTERFACE"=>"CGI/1.2", "REQUEST_METHOD"=>"GET", "REQUEST_PATH"=>"/admin/users"}

---
@evanphx
Copy link
Member

evanphx commented Apr 23, 2016

Well, I'm not sure how thats a @, because the decoded version of what you have there is '%'. I can fix puma to allow through the bare % in that position though, since Ruby's URI.decode seems to accept it.

@lalitlogical
Copy link
Author

Thanks.

Actually I want to say that when I insert @ which later convert into % causes the issue.

Just for confirmation, If I searched for @gmail.com or y@g, lalit@, etc, above commit work?

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

No branches or pull requests

2 participants