about summary refs log tree commit homepage
path: root/lib/mongrel.rb
diff options
context:
space:
mode:
authorzedshaw <zedshaw@19e92222-5c0b-0410-8929-a290d50e31e9>2006-11-25 02:54:08 +0000
committerzedshaw <zedshaw@19e92222-5c0b-0410-8929-a290d50e31e9>2006-11-25 02:54:08 +0000
commit1a16539f4258f670c61e8aced1184216a517847b (patch)
tree5668312e9309f73b433e0d7e1c68671cbc961b43 /lib/mongrel.rb
parentb60da7b70f04bae1c212b7624393027cf1f4908f (diff)
downloadunicorn-1a16539f4258f670c61e8aced1184216a517847b.tar.gz
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@413 19e92222-5c0b-0410-8929-a290d50e31e9
Diffstat (limited to 'lib/mongrel.rb')
-rw-r--r--lib/mongrel.rb24
1 files changed, 0 insertions, 24 deletions
diff --git a/lib/mongrel.rb b/lib/mongrel.rb
index f9e373b..aad3a31 100644
--- a/lib/mongrel.rb
+++ b/lib/mongrel.rb
@@ -199,20 +199,7 @@ module Mongrel
       content_length = @params[Const::CONTENT_LENGTH].to_i
       remain = content_length - @params.http_body.length
       
-      if @params.has_key? 'CONTENT_TYPE'
-        # see if it's multipart, and carve out the boundary for later
-        @mpart_type, @mpart_boundary = @params['CONTENT_TYPE'].split(/;\s*/)
-        if @mpart_type and @mpart_boundary and @mpart_boundary.include? "="
-          @mpart_boundary = @mpart_boundary.split("=")[1].strip
-          STDERR.puts "boundary: #{@mpart_boundary}"
-          @params['MULTIPART_TYPE'] = @mpart_type
-          @params['MULTIPART_BOUNDARY'] = @mpart_boundary
-          @search = BMHSearch.new(@mpart_boundary, 100)
-        end
-      end
-
       dispatcher.request_begins(@params) if dispatcher
-      @search.find @params.http_body if @search and @params.http_body.length > @mpart_boundary.length
 
       # Some clients (like FF1.0) report 0 for body and then send a body.  This will probably truncate them but at least the request goes through usually.
       if remain <= 0
@@ -235,15 +222,6 @@ module Mongrel
         read_body(remain, content_length, dispatcher)
       end
 
-      if @search and @body
-        STDERR.puts "number of boundaries: #{@search.nfound}"
-        @body.rewind
-        @search.pop.each do |boundary|
-          @body.seek(boundary - 2)
-          STDERR.puts "BOUNDARY at #{boundary}: #{@body.read(@mpart_boundary.length + 2)}"
-        end
-      end
-
       @body.rewind if @body
     end
 
@@ -256,7 +234,6 @@ module Mongrel
       begin
         # write the odd sized chunk first
         @params.http_body = read_socket(remain % Const::CHUNK_SIZE)
-        @search.find(@params.http_body) if @search
 
         remain -= @body.write(@params.http_body)
         dispatcher.request_progress(@params, remain, total) if dispatcher
@@ -265,7 +242,6 @@ module Mongrel
         until remain <= 0 or @socket.closed?
           # ASSUME: we are writing to a disk and these writes always write the requested amount
           @params.http_body = read_socket(Const::CHUNK_SIZE)
-          @search.find(@params.http_body) if @search
           remain -= @body.write(@params.http_body)
           dispatcher.request_progress(@params, remain, total) if dispatcher
         end