about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2015-05-09 09:11:29 +0000
committerEric Wong <e@80x24.org>2015-05-09 09:28:10 +0000
commit690d893af45bce8ac36f8fb739400ee0ff166d2e (patch)
tree6fa7178bd7f9dac3b553ae9d7b87d83605a73b6f
parent89fe543e561edc740cf93b5c017d7406546382af (diff)
downloadyahns-690d893af45bce8ac36f8fb739400ee0ff166d2e.tar.gz
Arrays are less verbose, but they have more bytecode overhead
which actually matters at runtime.
-rw-r--r--extras/proxy_pass.rb2
-rw-r--r--lib/yahns/proxy_pass.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/extras/proxy_pass.rb b/extras/proxy_pass.rb
index b7fc87a..99ca6d6 100644
--- a/extras/proxy_pass.rb
+++ b/extras/proxy_pass.rb
@@ -200,7 +200,7 @@ class ProxyPass # :nodoc:
       logger = env['rack.logger'] and
         Yahns::Log.exception(logger, 'proxy_pass', e)
     end
-    [ 502, [ %w(Content-Length 0), %w(Content-Type text/plain) ], [] ]
+    [ 502, { 'Content-Length' => '0', 'Content-Type' => 'text/plain' }, [] ]
   end
 
   def send_body(input, ures, chunked)
diff --git a/lib/yahns/proxy_pass.rb b/lib/yahns/proxy_pass.rb
index 15ae17c..7bbab51 100644
--- a/lib/yahns/proxy_pass.rb
+++ b/lib/yahns/proxy_pass.rb
@@ -243,6 +243,6 @@ class Yahns::ProxyPass # :nodoc:
     [ 500, [], [] ]
   rescue => e
     Yahns::Log.exception(env['rack.logger'], 'proxy_pass', e)
-    [ 502, [ %w(Content-Length 0), %w(Content-Type text/plain) ], [] ]
+    [ 502, { 'Content-Length' => '0', 'Content-Type' => 'text/plain' }, [] ]
   end
 end