about summary refs log tree commit homepage
diff options
context:
space:
mode:
-rw-r--r--lib/mongrel.rb5
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/mongrel.rb b/lib/mongrel.rb
index 6eac6e2..595df66 100644
--- a/lib/mongrel.rb
+++ b/lib/mongrel.rb
@@ -200,9 +200,6 @@ module Mongrel
         @body = StringIO.new
         @body.write params.http_body
         dispatcher.request_progress(params, 0, content_length) if dispatcher
-      elsif remain < 0
-        # ERROR, they're sending bad requests
-        raise HttpParserError.new("Sent body size #{params.http_body.length} but declared Content-Length: #{content_length}")
       elsif remain > 0
         # must read more data to complete body
         if remain > Const::MAX_BODY
@@ -218,7 +215,7 @@ module Mongrel
         read_body(remain, content_length, dispatcher)
       end
 
-      @body.rewind
+      @body.rewind if body
     end