I recently upgraded a rails 3.0 application to rails 3.1.
This Rails application has a very simple Sinatra app at the top of the middleware stack using
which acts as an api endpoint only.
This crashes the application when using rails 3.1 and trying to access a URL handled by the rails app; accessing urls handled by the Sinatra app cause no trouble. The stacktrace (using webrick) is in this gist: https://gist.github.com/1216078
Reverting to rails 3.0 fixes the issue
Removing the Sinatra app from the middleware stack in 3.1 also fixes the issue.
Tested with Sinatra 1.2.6 and master
I am not sure if this is a Sinatra / Rack / Rails problem. Assuming the problem isn't me being an idiot (please point out) I will try and make a very simple sample app that I can share.
After actually kicking the brain in gear I had a look at things and changed
and that seems to have fixed it. I have no idea why it broke going from 3.0 to 3.1 but hey ho. I shall leave the ticket open in case anyone wants to investigate (Or tell me I have been an idiot and to close the ticket)
This is probably due to the changes in Rack::Lock, I'll investigate. If you have a minute, could you try running the insert_before version against Sinatra master?
add tests to check compatiblity with Rack::Lock, related to #352
I've set up a 3.1 app, added a Sinatra middleware, added Rack::Protection separately, tried a few combinations but I was unable to produce any issues what so ever.
Apologies for the delay, was on holidays.
Master still exhibits the problem on my app. Could you send me the link to the test app you made and I shall see if I can find some common ground that causes trouble.
Could you try running against a post 9c4ac4c master?
Ok, will test on Monday
Cool, lemme know if you need anything. This is the only blocking issue for a 1.3 release.
Excellent! Just tested with Sinatra master and the problem did not occur. Thank you very much!
Awesome! I see a release in the near future.