about summary refs log tree commit homepage
diff options
context:
space:
mode:
-rw-r--r--lib/rainbows/dev_fd_response.rb4
-rw-r--r--lib/rainbows/event_machine.rb4
-rw-r--r--lib/rainbows/rev/deferred_response.rb2
-rw-r--r--rainbows.gemspec6
4 files changed, 8 insertions, 8 deletions
diff --git a/lib/rainbows/dev_fd_response.rb b/lib/rainbows/dev_fd_response.rb
index bab35bc..479a668 100644
--- a/lib/rainbows/dev_fd_response.rb
+++ b/lib/rainbows/dev_fd_response.rb
@@ -40,7 +40,7 @@ module Rainbows
         # we need to make sure our pipe output is Fiber-compatible
         case env["rainbows.model"]
         when :FiberSpawn, :FiberPool, :RevFiberSpawn
-          return [ status, headers.to_hash, Fiber::IO.new(io,::Fiber.current) ]
+          return [ status, headers, Fiber::IO.new(io,::Fiber.current) ]
         end
       else # unlikely, char/block device file, directory, ...
         return response
@@ -48,7 +48,7 @@ module Rainbows
       resp = dup # be reentrant here
       resp.to_path = "/dev/fd/#{io.fileno}"
       resp.to_io = io
-      [ status, headers.to_hash, resp ]
+      [ status, headers, resp ]
     end
 
     # called by the webserver or other middlewares if they can't
diff --git a/lib/rainbows/event_machine.rb b/lib/rainbows/event_machine.rb
index e5560d3..6ba536b 100644
--- a/lib/rainbows/event_machine.rb
+++ b/lib/rainbows/event_machine.rb
@@ -118,7 +118,7 @@ module Rainbows
         if st.file?
           headers.delete('Transfer-Encoding')
           headers['Content-Length'] ||= st.size.to_s
-          response = [ response[0], headers.to_hash, [] ]
+          response = [ response[0], headers, [] ]
           HttpResponse.write(self, response, out)
           stream = stream_file_data(body.to_path)
           stream.callback { quit } unless alive
@@ -130,7 +130,7 @@ module Rainbows
           else
             out[0] = CONN_CLOSE
           end
-          response = [ response[0], headers.to_hash, [] ]
+          response = [ response[0], headers, [] ]
           HttpResponse.write(self, response, out)
           if do_chunk
             EM.watch(io, ResponseChunkPipe, self).notify_readable = true
diff --git a/lib/rainbows/rev/deferred_response.rb b/lib/rainbows/rev/deferred_response.rb
index 62a308c..fd7a499 100644
--- a/lib/rainbows/rev/deferred_response.rb
+++ b/lib/rainbows/rev/deferred_response.rb
@@ -42,7 +42,7 @@ module Rainbows
         end
         client.defer_body(io, out)
         out.nil? or
-          client.write(HttpResponse.header_string(status, headers.to_hash, out))
+          client.write(HttpResponse.header_string(status, headers, out))
       end
 
       def initialize(io, client, do_chunk, body)
diff --git a/rainbows.gemspec b/rainbows.gemspec
index 4726987..ca925ae 100644
--- a/rainbows.gemspec
+++ b/rainbows.gemspec
@@ -40,15 +40,15 @@ Gem::Specification.new do |s|
 
   s.test_files = test_files
 
+  # we want a newer Rack for a valid HeaderHash#each
+  s.add_dependency(%q<rack>, ['~> 1.1'])
+
   # we need Unicorn for the HTTP parser and process management
   # Unicorn 0.991.0 handles config.ru when started outside of
   # the prespecified working_directory
   s.add_dependency(%q<unicorn>, [">= 0.991.0", "< 2.0.0"])
   s.add_development_dependency(%q<isolate>, "~> 2.0.2")
 
-  # Unicorn already depends on Rack
-  # s.add_dependency(%q<rack>)
-
   # optional runtime dependencies depending on configuration
   # see config/isolate.rb for the exact versions we've tested with
   #