123456789_123456789_123456789_123456789_123456789_

Class: Unicorn::PrereadInput

Do not use. This class is for internal use only.
Relationships & Source Files
Inherits: Object
Defined in: lib/unicorn/preread_input.rb

Overview

run YourApp.new

Class Method Summary

Instance Method Summary

Constructor Details

.new(app) ⇒ PrereadInput

[ GitHub ]

  
# File 'lib/unicorn/preread_input.rb', line 19

def initialize(app)
  @app = app
end

Instance Method Details

#call(env)

[ GitHub ]

  
# File 'lib/unicorn/preread_input.rb', line 23

def call(env)
  buf = ""
  input = env["rack.input"]
  if input.respond_to?(:rewind)
    true while input.read(16384, buf)
    input.rewind
  end
  @app.call(env)
end