1 # -*- encoding: binary -*-
4 module Rainbows::ReverseProxy::EvClient
5 include Rainbows::ReverseProxy::Synchronous
6 AsyncCallback = "async.callback"
7 CBB = Unicorn::TeeInput.client_body_buffer_size
8 Content_Length = "Content-Length"
9 Transfer_Encoding = "Transfer-Encoding"
15 response = @parser.headers(@headers, @rbuf << buf) or return
16 if (cl = @headers[Content_Length] && cl.to_i > CBB) ||
17 (%r{\bchunked\b} =~ @headers[Transfer_Encoding])
18 @body = LargeBody.new("")
20 @response = response << @body
23 @response = response << [ @body ]
28 class LargeBody < Tempfile
32 while read(16384, buf)