Class: Sinatra::ExtendedRack

### Home Classes Methods

### In Files

- lib/sinatra/base.rb

### Parent

Struct.new(:app)

### Methods

- #call

### Files

- LICENSE

### Class/Module Index

Quicksearch

- Sinatra
- Sinatra::Application
- Sinatra::CommonLogger
- Sinatra::ExtendedRack
- Sinatra::Helpers
- Sinatra::Helpers::Stream
- Sinatra::Helpers::Stream::Application
- Sinatra::Helpers::Stream::Base
- Sinatra::Helpers::Stream::Templates
- Sinatra::Helpers::Stream::Templates::ContentTyped
- Sinatra::Helpers::Stream::Wrapper
- Sinatra::Request
- Sinatra::Request::AcceptEntry
- Sinatra::Response
- Sinatra::ShowExceptions
- Rack
- Rack::Builder

No matching classes.

# Sinatra::ExtendedRack

Some Rack handlers (Thin, Rainbows!) implement an extended body object protocol, however, some middleware (namely Rack::Lint) will break it by not mirroring the methods in question. This middleware will detect an extended body object and will make sure it reaches the handler directly. We do this here, so our middleware and middleware set up by the app will still be able to run.

### Public Instance Methods

call(env) click to toggle source

    # File lib/sinatra/base.rb, line 179
    def call(env)
      result, callback = app.call(env), env['async.callback']
      return result unless callback and async?(*result)
      after_response { callback.call result }
      setup_close(env, *result)
      throw :async
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.