Rainbows! Rack HTTP server user/dev discussion
 help / color / Atom feed
bcf1dbac6b5129ba1a10bc4bb395eb2bb45e73ad blob 675 bytes (raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
 
# -*- encoding: binary -*-
# :enddoc:
# avoid modifying Unicorn::HttpParser
class Rainbows::HttpParser < Unicorn::HttpParser
  @keepalive_requests = 100
  class << self
    attr_accessor :keepalive_requests
  end

  def initialize(*args)
    @keepalive_requests = self.class.keepalive_requests
    super
  end

  def next?
    return false if (@keepalive_requests -= 1) <= 0
    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

  def never!
    false
  end
end
debug log:

solving bcf1dba ...
found bcf1dba in http://bogomips.org/rainbows.git

Rainbows! Rack HTTP server user/dev discussion

Archives are clonable:
	git clone --mirror http://bogomips.org/rainbows-public
	git clone --mirror http://ou63pmih66umazou.onion/rainbows-public

Example config snippet for mirrors

Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.lang.ruby.rainbows
	nntp://ou63pmih66umazou.onion/inbox.comp.lang.ruby.rainbows

 note: .onion URLs require Tor: https://www.torproject.org/

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git