I'm following along Michael Hartl's Rails tutorial, and I've seem to hit a wall in Chapter 11 Link to relevant section. I'm running this from my own computer, so I'm visiting localhost:3000. I create a new user via the signup page in the app, and I can check the rails server logs to see the email that is generated with the link for activation. However, when I follow the link I get an error in chrome (and other browsers as well) saying:
This site can't provide a secure connection
localhost sent an invalid response.
Try running Windows Network Diagnostics.
ERR_SSL_PROTOCOL_ERROR
My server logs state:
2017-06-01 21:03:21 -0400: HTTP parse error, malformed request (): #
<Puma::HttpParserError: Invalid HTTP format, parsing fails.>
2017-06-01 21:03:21 -0400: 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"=>"puma 3.4.0 Owl Bowl
Brawl", "GATEWAY_INTERFACE"=>"CGI/1.2"}
I've tried turning off my firewall, resetting my cache and cookies, and other solutions I found on the web, but nothing seems to do the trick. I know common practice is to give relevant snippets of application code, but I honestly don't even know where to begin with that. If there's any files you need to see, then I'll be happy to post them. Thanks.
I ran into the same Problem and it took me some time to solve it. Probably You solved it by now. So to save others the time finding the solution, I just want to share it here. The solution is to just hit localhost:3000 without the https:// This way there is now ssl decryption/parsing involved, which is not necessary in development and will only cause a parsing error.
Best Sebastian
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.