Puma:HTTP 解析错误,请求格式错误 [英] Puma: HTTP parse error, malformed request
本文介绍了Puma:HTTP 解析错误,请求格式错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
与工头一起启动我的本地服务器,每当我提出任何请求时,我都会得到以下信息.
Firing up my local server with foreman and I get the following whenever I make any request.
HTTP parse error, malformed request (): #<Puma::HttpParserError: Invalid HTTP format, parsing fails.>
ENV: {"rack.version"=>[1, 3], "rack.errors"=>#<IO:<STDERR>>, "rack.multithread"=>true, "rack.multiprocess"=>false, "rack.run_once"=>false, "SCRIPT_NAME"=>"", "CONTENT_TYPE"=>"text/plain", "QUERY_STRING"=>"", "SERVER_PROTOCOL"=>"HTTP/1.1", "SERVER_SOFTWARE"=>"2.9.1", "GATEWAY_INTERFACE"=>"CGI/1.2"}
使用 rvm 运行 Ruby 2.2.0
Running Ruby 2.2.0 with rvm
以及来自我的 Gemfile 的一些可能相关的部分:
And some potentially relevant bits from my Gemfile:
gem 'rails', '4.2.5.2'
gem 'puma', '2.9.1'
在这里完全被难住了,希望得到任何帮助.很高兴从我的配置中提供更多上下文,但我什至不知道从哪里开始.
Completely stumped here and would appreciate any help. Happy to provide more context from my config, but I don't even know where to start.
当我使用 foreman start
运行服务器时出现此错误.如果我用 rails s
启动它,那么一切都很好.
I get this error when I run the server with foreman start
. If I fire it up with rails s
then all is well.
推荐答案
确保您使用的是 http://而不是 https://
Make sure you're using http:// and not https://
这篇关于Puma:HTTP 解析错误,请求格式错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文