Changeset 875

Show
Ignore:
Timestamp:
11/12/07 15:06:56 (10 months ago)
Author:
evanweaver
Message:

apply #15590 (Aman Gupta)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lib/mongrel/http_response.rb

    r766 r875  
    4444      @body = StringIO.new 
    4545      @status = 404 
    46       @reason = HTTP_STATUS_CODES[@status] 
    4746      @header = HeaderOut.new(StringIO.new) 
    4847      @header[Const::DATE] = Time.now.httpdate 
     
    6059    # all handlers run and then mongrel finalizes the request when they're 
    6160    # all done. 
    62     def start(status=200, finalize=false, reason=HTTP_STATUS_CODES[status]
     61    def start(status=200, finalize=false, reason=nil
    6362      @status = status.to_i 
    6463      @reason = reason 
     
    8584      if not @status_sent 
    8685        @header['Content-Length'] = content_length if content_length and @status != 304 
    87         write(Const::STATUS_FORMAT % [@status, @reason]) 
     86        write(Const::STATUS_FORMAT % [@status, @reason || HTTP_STATUS_CODES[@status]]) 
    8887        @status_sent = true 
    8988      end