about summary refs log tree commit homepage
path: root/lib
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2013-11-05 02:22:55 +0000
committerEric Wong <normalperson@yhbt.net>2013-11-05 02:24:40 +0000
commit631a2bfc73f12c06e0e5071958176a2ef92c5e25 (patch)
tree69d3f4d70f5fc26864cc36f76f477b35aaf3c1a4 /lib
parent3192ec1b4054bcc228dfb88e57d5e1c828682a7b (diff)
downloadyahns-631a2bfc73f12c06e0e5071958176a2ef92c5e25.tar.gz
We allow applications to drop persistent connections, this does not
seem forbidden by Rack and gives the app author some control over
the lifetime of a connection.
Diffstat (limited to 'lib')
-rw-r--r--lib/yahns/http_response.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/yahns/http_response.rb b/lib/yahns/http_response.rb
index 1b9478f..8a4bd6a 100644
--- a/lib/yahns/http_response.rb
+++ b/lib/yahns/http_response.rb
@@ -125,7 +125,7 @@ module Yahns::HttpResponse # :nodoc:
           buf << kv_str(key, value)
         when %r{\AConnection\z}i
           # allow Rack apps to tell us they want to drop the client
-          alive = !!(value =~ /\bclose\b/i)
+          alive = false if value =~ /\bclose\b/i
         when "rack.hijack"
           hijack = value
           body = nil # ensure we do not close body