about summary refs log tree commit homepage
path: root/lib
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2009-03-29 19:01:24 -0700
committerEric Wong <normalperson@yhbt.net>2009-03-29 20:59:52 -0700
commit066226e97c1a08f927f62ae50d7e95a9ada4f303 (patch)
tree5f1fafb16ed79427a2df4c136fe9f31efc73ac98 /lib
parentdf58b5249c3e17ee4fab448224e3f043a2444fa0 (diff)
downloadunicorn-066226e97c1a08f927f62ae50d7e95a9ada4f303.tar.gz
"HTTP_BODY" could conflict with a "Body:" HTTP header if there
ever is one.  Also, try to hide this body from the Rack
environment before @app is called since it is only used by
Unicorn internally.
Diffstat (limited to 'lib')
-rw-r--r--lib/unicorn/const.rb3
-rw-r--r--lib/unicorn/http_request.rb2
2 files changed, 1 insertions, 4 deletions
diff --git a/lib/unicorn/const.rb b/lib/unicorn/const.rb
index f2143bf..3a3d143 100644
--- a/lib/unicorn/const.rb
+++ b/lib/unicorn/const.rb
@@ -54,9 +54,6 @@ module Unicorn
     # This is the part of the path after the SCRIPT_NAME.
     PATH_INFO="PATH_INFO".freeze
     
-    # Request body
-    HTTP_BODY="HTTP_BODY".freeze
-
     # The original URI requested by the client.
     REQUEST_URI='REQUEST_URI'.freeze
     REQUEST_PATH='REQUEST_PATH'.freeze
diff --git a/lib/unicorn/http_request.rb b/lib/unicorn/http_request.rb
index 70378ef..750deea 100644
--- a/lib/unicorn/http_request.rb
+++ b/lib/unicorn/http_request.rb
@@ -83,7 +83,7 @@ module Unicorn
     # Handles dealing with the rest of the request
     # returns a Rack environment if successful, raises an exception if not
     def handle_body(socket)
-      http_body = @params[Const::HTTP_BODY]
+      http_body = @params.delete(:http_body)
       content_length = @params[Const::CONTENT_LENGTH].to_i
       remain = content_length - http_body.length