2 # Rack::Cascade tries an request on several apps, and returns the
3 # first response that is not 404 (or in a list of configurable
9 def initialize(apps
, catch
=404)
15 status
= headers
= body
= nil
16 raise ArgumentError
, "empty cascade" if @apps.empty
?
19 status
, headers
, body
= app
.call(env)
20 break unless @catch.include?(status
.to_i
)
23 [status
, headers
, body
]
34 alias_method
:<<, :add