lib/falcon/adapters/rack.rb in falcon-0.19.2 vs lib/falcon/adapters/rack.rb in falcon-0.19.3

- old
+ new

@@ -16,10 +16,12 @@ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. +require 'rack' + require_relative 'input' require_relative 'response' require 'async/logger' @@ -32,9 +34,11 @@ CONTENT_TYPE = 'CONTENT_TYPE'.freeze CONTENT_LENGTH = 'CONTENT_LENGTH'.freeze def initialize(app, logger = Async.logger) @app = app + + raise ArgumentError, "App must be callable!" unless @app.respond_to?(:call) @logger = logger end # Rack separates multiple headers with the same key, into a single field with multiple "lines".