Sha256: 8bcac29b554a42e11ffb835224426ef789c7f6d51c9e8cd9ba18695cf69da3c4

Contents?: true

Size: 459 Bytes

Versions: 1

Compression:

Stored size: 459 Bytes

Contents

# -*- encoding: binary -*-
# :enddoc:
# only used by synchronous interfaces
module Rainbows::RackInput
  NULL_IO = Unicorn::HttpRequest::NULL_IO
  RACK_INPUT = Unicorn::HttpRequest::RACK_INPUT
  CLIENT_IO = Rainbows::Const::CLIENT_IO

  def self.setup
    const_set(:IC, Unicorn::HttpRequest.input_class)
  end

  def set_input(env, hp, client)
    env[RACK_INPUT] = 0 == hp.content_length ? NULL_IO : IC.new(client, hp)
    env[CLIENT_IO] = client
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rainbows-2.1.0 lib/rainbows/rack_input.rb