1 # -*- encoding: binary -*-
3 # avoid modifying Unicorn::HttpParser
4 class Rainbows::HttpParser < Unicorn::HttpParser
5 @keepalive_requests = 100
7 attr_accessor :keepalive_requests
11 @keepalive_requests = self.class.keepalive_requests
16 return false if (@keepalive_requests -= 1) <= 0
22 env['rack.hijack'] = self # avoid allocating a new proc this way
25 def call # for rack.hijack
26 env['rack.hijack_io'] = @hijack_io
30 alias_method :next?, :never!