puma: Puma should provide a better error message when attempting to open an SSL connection to a non-SSL puma
2016-05-29 10:55:33 +0530: HTTP parse error, malformed request (): #<Puma::HttpParserError: Invalid HTTP format, parsing fails.>
2016-05-29 10:55:33 +0530: ENV: {"rack.version"=>[1, 3], "rack.errors"=>#<IO:<STDERR>>, "rack.multithread"=>true, "rack.multiprocess"=>false, "rack.run_once"=>false, "SCRIPT_NAME"=>"", "QUERY_STRING"=>"", "SERVER_PROTOCOL"=>"HTTP/1.1", "SERVER_SOFTWARE"=>"3.1.0", "GATEWAY_INTERFACE"=>"CGI/1.2", "REQ
UEST_METHOD"=>"GET", "REQUEST_PATH"=>"/selections.js"}
---
rails 4.2 puma latest version
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 11
- Comments: 18 (9 by maintainers)
I have the same when I open https:// instead http://. E.g. https://localhost:3000/ instead http://localhost:3000/.
This is super common in dev environments where sometimes people have a project on port 3000 which uses SSL, and then they switch to one that doesn’t and the browser tries an SSL connection.
@nicolasmlv I think you have to clear out Chrome’s HSTS cache. chrome://net-internals/#hsts
Changing to docs/feature to reflect that this issue remains open for providing better/more informative error messages here (“hey, this looks like SSL but I’m not accepting SSL connections!”)
I don’t know if anyone else might have this issue, but mine was related to passing in the wrong address
wss://localhost:3000/cable
secure instead ofws://localhost:3000/cable
unsecure