about summary refs log tree commit homepage
path: root/lib/mongrel
diff options
context:
space:
mode:
authorevanweaver <evanweaver@19e92222-5c0b-0410-8929-a290d50e31e9>2007-11-12 20:06:56 +0000
committerevanweaver <evanweaver@19e92222-5c0b-0410-8929-a290d50e31e9>2007-11-12 20:06:56 +0000
commit0660f36c162714afcab221638ec2f703d20425ab (patch)
treeaca3cc76336e0d2562b42824cab29d42adc1e7c9 /lib/mongrel
parent7c97dcd342e0f5135224de91b8f1c8d9b2253cf3 (diff)
downloadunicorn-0660f36c162714afcab221638ec2f703d20425ab.tar.gz
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@875 19e92222-5c0b-0410-8929-a290d50e31e9
Diffstat (limited to 'lib/mongrel')
-rw-r--r--lib/mongrel/http_response.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/mongrel/http_response.rb b/lib/mongrel/http_response.rb
index ff715cc..1eb7077 100644
--- a/lib/mongrel/http_response.rb
+++ b/lib/mongrel/http_response.rb
@@ -43,7 +43,6 @@ module Mongrel
       @socket = socket
       @body = StringIO.new
       @status = 404
-      @reason = HTTP_STATUS_CODES[@status]
       @header = HeaderOut.new(StringIO.new)
       @header[Const::DATE] = Time.now.httpdate
       @body_sent = false
@@ -59,7 +58,7 @@ module Mongrel
     # by simple passing "finalize=true" to the start method.  By default
     # all handlers run and then mongrel finalizes the request when they're
     # all done.
-    def start(status=200, finalize=false, reason=HTTP_STATUS_CODES[status])
+    def start(status=200, finalize=false, reason=nil)
       @status = status.to_i
       @reason = reason
       yield @header, @body
@@ -84,7 +83,7 @@ module Mongrel
     def send_status(content_length=@body.length)
       if not @status_sent
         @header['Content-Length'] = content_length if content_length and @status != 304
-        write(Const::STATUS_FORMAT % [@status, @reason])
+        write(Const::STATUS_FORMAT % [@status, @reason || HTTP_STATUS_CODES[@status]])
         @status_sent = true
       end
     end