提交 78af2710 编写于 作者: J Jeremy Kemper

Skip respond_to check so rack.input doesn't have to implement it

上级 1e02d95d
...@@ -6,8 +6,8 @@ def parse_multipart_with_rewind(env) ...@@ -6,8 +6,8 @@ def parse_multipart_with_rewind(env)
result = parse_multipart_without_rewind(env) result = parse_multipart_without_rewind(env)
begin begin
env['rack.input'].rewind if env['rack.input'].respond_to?(:rewind) env['rack.input'].rewind
rescue Errno::ESPIPE rescue NoMethodError, Errno::ESPIPE
# Handles exceptions raised by input streams that cannot be rewound # Handles exceptions raised by input streams that cannot be rewound
# such as when using plain CGI under Apache # such as when using plain CGI under Apache
end end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册