brianmario / escape_utils

Faster string escaping routines for your ruby apps
MIT License
513 stars 52 forks source link

escape_utils/url/rack incompatible with newer versions of rack #25

Closed thoughtafter closed 2 years ago

thoughtafter commented 11 years ago

I've spent the last several hours tracking down a bug in one of my applications. It was causing extremely erratic behavior, mostly problems in production with people being signed out or redirected improperly. On the development side I encountered these errors but couldn't get a test case. What I did find was that my integration tests were failing randomly. Randomly as in each run a different set of tests would fail at different assertions. I figured it had to be a recent change but I started by out a bunch of libraries that are unessential, like escape_utils. Imagine my surprise when the problem was fixed adding gems back in 1 by 1 escape_utils seemed to cause the problem. Going through the monkey patches I found the url/rack patch was the problem. I suspect this is due to the changes in how rack handles escape and unescape and some other change that was added recently, within the last month:

https://github.com/rack/rack/blob/master/lib/rack/utils.rb

Probably the url/rack monkeypatch is not compatible with newer versions of rack. I thought you should know.