This repository has been archived by the owner on May 26, 2021. It is now read-only.
forked from sinatra/sinatra
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix middleware not running when app run as middleware [sinatra#161]
The app's middleware pipeline was ignored when the app itself was run as middleware. This was due to the separate call paths for middleware vs. endpoint apps. This change makes it so that both endpoint and middleware apps are invoked via the same instance level #call method. One potentially confusing aspect of this change is that Base.new now returns the head of the app's middleware pipeline. If no middleware is used by the app, this will be an instance of the Base class; however, if middleware is used, Base.new will return the head of the middleware chain leading to the Base instance.
- Loading branch information
Showing
2 changed files
with
53 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters