diff options
Diffstat (limited to 'extras')
-rw-r--r-- | extras/proxy_pass.rb | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/extras/proxy_pass.rb b/extras/proxy_pass.rb index de6a2b1..0bec4ee 100644 --- a/extras/proxy_pass.rb +++ b/extras/proxy_pass.rb @@ -135,12 +135,7 @@ class ProxyPass # :nodoc: end def call(env) - case request_method = env["REQUEST_METHOD"] - when "GET", "HEAD" # OK - else - return [ 405, [%w(Content-Length 0), %w(Content-Length 0)], [] ] - end - + request_method = env['REQUEST_METHOD'] req = Rack::Request.new(env) path = @path.gsub(/\$(\w+)/) { req.__send__($1.to_sym) } req = "#{request_method} #{path} HTTP/1.1\r\n" \ @@ -204,7 +199,7 @@ class ProxyPass # :nodoc: buf.replace("#{buf.size.to_s(16)}\r\n#{buf}\r\n") ures.req_write(buf, @timeout) end - ures.req_write("0\r\n\r\n") + ures.req_write("0\r\n\r\n", @timeout) else # common if we hit uploads while input.read(16384, buf) ures.req_write(buf, @timeout) |