Changeset 875
- Timestamp:
- 11/12/07 15:06:56 (10 months ago)
- Files:
-
- trunk/lib/mongrel/http_response.rb (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/lib/mongrel/http_response.rb
r766 r875 44 44 @body = StringIO.new 45 45 @status = 404 46 @reason = HTTP_STATUS_CODES[@status]47 46 @header = HeaderOut.new(StringIO.new) 48 47 @header[Const::DATE] = Time.now.httpdate … … 60 59 # all handlers run and then mongrel finalizes the request when they're 61 60 # all done. 62 def start(status=200, finalize=false, reason= HTTP_STATUS_CODES[status])61 def start(status=200, finalize=false, reason=nil) 63 62 @status = status.to_i 64 63 @reason = reason … … 85 84 if not @status_sent 86 85 @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]]) 88 87 @status_sent = true 89 88 end
