about summary refs log tree commit homepage
path: root/lib/mongrel/http_response.rb
diff options
context:
space:
mode:
authorevanweaver <evanweaver@19e92222-5c0b-0410-8929-a290d50e31e9>2008-05-24 23:06:53 +0000
committerevanweaver <evanweaver@19e92222-5c0b-0410-8929-a290d50e31e9>2008-05-24 23:06:53 +0000
commit45ff7b22b67123dd8345f3c50151e89cc91ce2b7 (patch)
treee85c8aa353e3e9f05e90ee8bf76a6593520e1b01 /lib/mongrel/http_response.rb
parentf69f3602b11dc839bb09f8c783b5ec27c54694fd (diff)
parentfa3f48f65222eb5591ef3dd9c05b6c958d564fa4 (diff)
downloadunicorn-45ff7b22b67123dd8345f3c50151e89cc91ce2b7.tar.gz
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@1020 19e92222-5c0b-0410-8929-a290d50e31e9
Diffstat (limited to 'lib/mongrel/http_response.rb')
-rw-r--r--lib/mongrel/http_response.rb9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/mongrel/http_response.rb b/lib/mongrel/http_response.rb
index e30bdaf..3076712 100644
--- a/lib/mongrel/http_response.rb
+++ b/lib/mongrel/http_response.rb
@@ -71,11 +71,14 @@ module Mongrel
     # sent the header or the body.  This is pretty catastrophic actually.
     def reset
       if @body_sent
-        raise "#{Time.now.httpdate}: You have already sent the request body."
+        raise "You have already sent the request body."
       elsif @header_sent
-        raise "#{Time.now.httpdate}: You have already sent the request headers."
+        raise "You have already sent the request headers."
       else
-        @header.out.truncate(0)
+        # XXX Dubious ( http://mongrel.rubyforge.org/ticket/19 )
+        @header.out.close
+        @header = HeaderOut.new(StringIO.new)
+        
         @body.close
         @body = StringIO.new
       end