Skip to content

Conversation

@janraasch
Copy link
Contributor

By requiring rack-timeout, Rack::Timeout is automatically added to the middleware of a Rails application.

See https://github.com/heroku/rack-timeout#rails-apps

This leads to unexpected behavior. When a user adds a non-standard Rack-Timeout to the middleware stack herself, she ends up with Rack-Timeout added twice. Worse, the configuration added automatically is the standard configuration which might differ from the one added manually in user land. Worst case comes to show when a user configures a service_timeout greater than the standard one.

The "rack/timeout/base" entry point was added in v0.3.0 of rack-timeout, see zombocom/rack-timeout@39fdbae.

I would advice to fix this rather sooner than later as all Rails apps using sentry-raven and rack-timeout with its manual configuration are affected by this.

By requiring `rack-timeout`, `Rack::Timeout` is automatically added to the middleware of a Rails application. 

See https://github.com/heroku/rack-timeout#rails-apps

This leads to unexpected behavior. When a user adds a non-standard `Rack-Timeout` to the middleware stack herself, she ends up with `Rack-Timeout` added twice. Worse, the configuration added automatically is the standard configuration which might differ from the one added manually in user land. Worst case comes to show when a user configures a `service_timeout` greater than the standard one.
@nateberkopec
Copy link
Contributor

Whoops, didn't know about 'rack/timeout/base'. Thanks for the catch.

@nateberkopec nateberkopec merged commit a8fac7f into getsentry:master Sep 30, 2016
@janraasch janraasch deleted the patch-1 branch September 30, 2016 14:37
@nateberkopec
Copy link
Contributor

Fixed in 2.0.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants