我正在尝试从Sintra提供文件。但是每当我尝试这样做时,都会出现以下错误。
"#<Rack::File::Iterator:0x0000555e0f7b5080>"[:errorI"LRack::Lint::LintError: Content-Length header was 2111, but should be 44:
ET[-I"F/usr/local/bundle/gems/rack-2.0.5/lib/rack/lint.rb:20:in `assert';
FI"V/usr/local/bundle/gems/rack-2.0.5/lib/rack/lint.rb:692:in `verify_content_length';
FI"E/usr/local/bundle/gems/rack-2.0.5/lib/rack/lint.rb:716:in `each'
FI"J/usr/local/bundle/gems/rack-2.0.5/lib/rack/body_proxy.rb:36:in `each'
FI"X/usr/local/bundle/gems/shotgun-0.9.2/lib/shotgun/loader.rb:88:in `proceed_as_child';
FI"M/usr/local/bundle/gems/shotgun-0.9.2/lib/shotgun/loader.rb:31:in `call!'
FI"L/usr/local/bundle/gems/shotgun-0.9.2/lib/shotgun/loader.rb:18:in `call';
FI"M/usr/local/bundle/gems/shotgun-0.9.2/lib/shotgun/favicon.rb:12:in `call';
FI"O/usr/local/bundle/gems/rack-2.0.5/lib/rack/urlmap.rb:68:in `block in call';
FI"F/usr/local/bundle/gems/rack-2.0.5/lib/rack/urlmap.rb:53:in `each';
FI"F/usr/local/bundle/gems/rack-2.0.5/lib/rack/urlmap.rb:53:in `call';
FI"H/usr/local/bundle/gems/rack-2.0.5/lib/rack/builder.rb:153:in `call';
FI"Z/usr/local/bundle/gems/thin-1.7.2/lib/thin/connection.rb:86:in `block in pre_process';
FI"K/usr/local/bundle/gems/thin-1.7.2/lib/thin/connection.rb:84:in `catch';
FI"Q/usr/local/bundle/gems/thin-1.7.2/lib/thin/connection.rb:84:in `pre_process';
FI"M/usr/local/bundle/gems/thin-1.7.2/lib/thin/connection.rb:53:in `process';
FI"R/usr/local/bundle/gems/thin-1.7.2/lib/thin/connection.rb:39:in `receive_data';
FI"W/usr/local/bundle/gems/eventmachine-1.2.7/lib/eventmachine.rb:195:in `run_machine';
FI"O/usr/local/bundle/gems/eventmachine-1.2.7/lib/eventmachine.rb:195:in `run';
FI"N/usr/local/bundle/gems/thin-1.7.2/lib/thin/backends/base.rb:73:in `start'
FI"H/usr/local/bundle/gems/thin-1.7.2/lib/thin/server.rb:162:in `start';
FI"K/usr/local/bundle/gems/rack-2.0.5/lib/rack/handler/thin.rb:22:in `run';
FI"O/usr/local/bundle/gems/shotgun-0.9.2/bin/shotgun:156:in `<top (required)>';
FI"//usr/local/bundle/bin/shotgun:23:in `load';
FI";/usr/local/bundle/bin/shotgun:23:in `<top (required)>';
FI"\/usr/local/lib/ruby/gems/2.3.0/ge
我的代码很简单,
get "/" do
send_file "README.md", :filename => "README.md",
:type => 'Application/octet-stream',
:disposition => 'attachment'
end
有人可以帮我吗?
预先感谢
Nixon