Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Rack::Server#build_app destroys middleware hash #498

Closed
ssteidte opened this Issue · 2 comments

2 participants

@ssteidte

build_app destroys the middleware hash:
klass = middleware.shift
app = klass.new(app, *middleware)
As this is a class variable, a second start of Rack::Server does not work.
Instead, build_app should be changed as below:
...
klass = middleware[0]
app = klass.new(app, *middleware[1..-1])
....
(server.rb, line 304)

@raggi raggi closed this in b25bbf8
@ssteidte

I don't modify it. Rack does it itself by calling "shift" on it in in build_app! Please re-open the ticket.

@raggi
Owner

It's fixed in the attached commit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.