1 # -*- encoding: binary -*-
3 # only used by synchronous interfaces
4 module Rainbows::RackInput
5 NULL_IO = Unicorn::HttpRequest::NULL_IO
6 RACK_INPUT = Unicorn::HttpRequest::RACK_INPUT
7 CLIENT_IO = Rainbows::Const::CLIENT_IO
10 const_set(:IC, Unicorn::HttpRequest.input_class)
13 def set_input(env, hp, client)
14 env[RACK_INPUT] = 0 == hp.content_length ? NULL_IO : IC.new(client, hp)
15 env[CLIENT_IO] = client