diff options
Diffstat (limited to 'lib/unicorn')
-rw-r--r-- | lib/unicorn/app/inetd.rb | 4 | ||||
-rw-r--r-- | lib/unicorn/http_request.rb | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/lib/unicorn/app/inetd.rb b/lib/unicorn/app/inetd.rb index 43a23eb..c3b8bbc 100644 --- a/lib/unicorn/app/inetd.rb +++ b/lib/unicorn/app/inetd.rb @@ -97,6 +97,10 @@ module Unicorn::App end def call(env) + expect = env[Unicorn::Const::HTTP_EXPECT] and + /\A100-continue\z/i =~ expect and + return [ 100, {} , [] ] + [ 200, { 'Content-Type' => 'application/octet-stream' }, CatBody.new(env, @cmd) ] end diff --git a/lib/unicorn/http_request.rb b/lib/unicorn/http_request.rb index 3df9120..ad1e23f 100644 --- a/lib/unicorn/http_request.rb +++ b/lib/unicorn/http_request.rb @@ -89,9 +89,6 @@ module Unicorn # returns a Rack environment if successful def handle_body(socket) PARAMS[Const::RACK_INPUT] = if (body = PARAMS.delete(:http_body)) - if 0 == body.size && /\A100-continue\z/i =~ PARAMS[Const::HTTP_EXPECT] - socket.write(Const::EXPECT_100_RESPONSE) - end length = PARAMS[Const::CONTENT_LENGTH].to_i if te = PARAMS[Const::HTTP_TRANSFER_ENCODING] |