Daily-Log, 2010-11-22, Passenger 3, iUI and authenticity tokens
An update of our production server to Passenger 3.0 worked without problem - kudos to the guys at Phusion! We have changed several parameters and expect our large Rails apps to run faster and better. The main change was that we keep one passenger running for the most used apps, regardless if the app has been idle or not.
We’ve had an iPhone layout for StellenAnzeiger for a long time. Intermittently we got Rails “Invalid AuthenticityToken” errors but were never able to pin them down. Of course, when we tested it, it “just worked (tm)”. We had a breakthrough today, when we noticed that the authenticity token we received on the server had spaces in it. It turns out, that the iUI framework we are using for the iPhone like layout changes “+” to " " in input fields. The authenticity token can contain pluses, so iUI mangled it - and the server promptly complained. The fix is a one line patch to iui.js - we weren’t the first people to run into the problem…