Rainbows! Rack HTTP server user/dev discussion
 help / color / Atom feed
ab3f7a3f6991baba9ae78772e5eedfa970daa904 blob 831 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:
require 'tempfile'
module Rainbows::ReverseProxy::EvClient
  include Rainbows::ReverseProxy::Synchronous
  CBB = Unicorn::TeeInput.client_body_buffer_size

  def receive_data(buf)
    if @body
      @body << buf
    else
      response = @parser.headers(@headers, @rbuf << buf) or return
      if (cl = @headers['Content-Length'.freeze] && cl.to_i > CBB) ||
         (%r{\bchunked\b} =~ @headers['Transfer-Encoding'.freeze])
        @body = LargeBody.new("")
        @body << @rbuf
        @response = response << @body
      else
        @body = @rbuf.dup
        @response = response << [ @body ]
      end
    end
  end

  class LargeBody < Tempfile
    def each
      buf = ""
      rewind
      while read(16384, buf)
        yield buf
      end
    end

    alias close close!
  end
end
debug log:

solving ab3f7a3 ...
found ab3f7a3 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