diff options
author | Eric Wong <e@80x24.org> | 2015-11-14 02:47:25 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2015-11-18 02:20:26 +0000 |
commit | 1a2a82721bf845a3f7e7a3972bc0f41befb25c41 (patch) | |
tree | 98da87ea5d5293b31fa3fd463b6d70b3059a1be3 /lib/rainbows/http_parser.rb | |
parent | 70c976bdd85bb8515fea01d6ad6074ef472fc2e0 (diff) | |
download | rainbows-1a2a82721bf845a3f7e7a3972bc0f41befb25c41.tar.gz |
unicorn lost the hijack_setup method in version 5, so we must recreate it ourselves.
Diffstat (limited to 'lib/rainbows/http_parser.rb')
-rw-r--r-- | lib/rainbows/http_parser.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/rainbows/http_parser.rb b/lib/rainbows/http_parser.rb index 30a67cb..bcf1dba 100644 --- a/lib/rainbows/http_parser.rb +++ b/lib/rainbows/http_parser.rb @@ -17,6 +17,15 @@ class Rainbows::HttpParser < Unicorn::HttpParser super end + def hijack_setup(io) + @hijack_io = io + env['rack.hijack'] = self # avoid allocating a new proc this way + end + + def call # for rack.hijack + env['rack.hijack_io'] = @hijack_io + end + def self.quit alias_method :next?, :never! end |