diff options
author | Eric Wong <normalperson@yhbt.net> | 2013-01-22 23:52:14 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2013-01-22 23:54:37 +0000 |
commit | fedb5e50829e6dfad30ca18ea525c812eccbec70 (patch) | |
tree | f00c797fa7838218128086fa217c92d3d47ab8f1 /lib/unicorn/http_request.rb | |
parent | 705cf5fcf8ccb37deef5d2b922d6d78d34765c5b (diff) | |
download | unicorn-fedb5e50829e6dfad30ca18ea525c812eccbec70.tar.gz |
Once a connection is hijacked, we ignore it completely and leave the connection at the mercy of the application.
Diffstat (limited to 'lib/unicorn/http_request.rb')
-rw-r--r-- | lib/unicorn/http_request.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/unicorn/http_request.rb b/lib/unicorn/http_request.rb index 3bc64ed..3795b3b 100644 --- a/lib/unicorn/http_request.rb +++ b/lib/unicorn/http_request.rb @@ -106,6 +106,10 @@ class Unicorn::HttpParser RACK_HIJACK = "rack.hijack".freeze RACK_HIJACK_IO = "rack.hijack_io".freeze + def hijacked? + env.include?(RACK_HIJACK_IO) + end + def hijack_setup(e, socket) e[RACK_HIJACK] = proc { e[RACK_HIJACK_IO] ||= socket } end @@ -113,5 +117,9 @@ class Unicorn::HttpParser # old Rack, do nothing. def hijack_setup(e, _) end + + def hijacked? + false + end end end |