about summary refs log tree commit homepage
path: root/lib/rainbows/response.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rainbows/response.rb')
-rw-r--r--lib/rainbows/response.rb7
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/rainbows/response.rb b/lib/rainbows/response.rb
index b624ea2..9a46659 100644
--- a/lib/rainbows/response.rb
+++ b/lib/rainbows/response.rb
@@ -1,10 +1,7 @@
 # -*- encoding: binary -*-
 # :enddoc:
-require 'time' # for Time#httpdate
-
 module Rainbows::Response
-  CRLF = Unicorn::HttpResponse::CRLF
-  CODES = Unicorn::HttpResponse::CODES
+  include Unicorn::HttpResponse
   Close = "close"
   KeepAlive = "keep-alive"
 
@@ -22,7 +19,7 @@ module Rainbows::Response
     @hp.headers? or return
     status = CODES[status.to_i] || status
     buf = "HTTP/1.1 #{status}\r\n" \
-          "Date: #{Time.now.httpdate}\r\n" \
+          "Date: #{httpdate}\r\n" \
           "Status: #{status}\r\n" \
           "Connection: #{alive ? KeepAlive : Close}\r\n"
     headers.each do |key, value|