Archive | August 2010

Nginx, Passenger, and UTF-8 in Urls

A while ago I upgraded Nginx and moved from mongrel to passenger on my companies rails cluster. Our application has a url canonocalization enforement which will redirect urls to the cirrect url if they get mangles in any way.

The mangled url

Will get redirected to the conanocal form:é

This enforcement is done with a check to make sure that the current url matched a newly generated one.

When I upgraded nginx and started using passenger the urls I was getting inifinate redirects because passenger encodes the UTF-8. THe fix was easy, but I was a bit surprised that the urls would not be decoded by default.


Redirects are now fixed.