about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2015-06-04 01:06:41 +0000
committerEric Wong <e@80x24.org>2015-06-04 01:06:41 +0000
commit44cf14154165c85e8081c51d3d01a6c690cc9e7a (patch)
tree424e4abcbb248a0bbf670bacf669dd453a0830bd
parentce18d9aa898c6634d975a867ead3dc80f808739a (diff)
downloadunicorn-44cf14154165c85e8081c51d3d01a6c690cc9e7a.tar.gz
It's ugly and less-readable to have redundant \z statements, and
according to ObjectSpace.memsize_of, this saves 4 bytes on x86-64.
-rw-r--r--lib/unicorn/http_response.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/unicorn/http_response.rb b/lib/unicorn/http_response.rb
index c9c2de8..801bf9a 100644
--- a/lib/unicorn/http_response.rb
+++ b/lib/unicorn/http_response.rb
@@ -33,7 +33,7 @@ module Unicorn::HttpResponse
             "Connection: close\r\n"
       headers.each do |key, value|
         case key
-        when %r{\A(?:Date\z|Connection\z)}i
+        when %r{\A(?:Date|Connection)\z}i
           next
         when "rack.hijack"
           # This should only be hit under Rack >= 1.5, as this was an illegal