Yuri Leikind
2008-Mar-03 15:31 UTC
Apache + mongrel cluster: early unescaping of URI by Apache
Hello all, I have run into a weird problem. I have the following route: map.show_wiki_page ''wiki/show/:name/:version'', :action => ''show'' , :version => nil, :requirements => {:version => /\d+/, :name => /[\d \w\?\!,\(\)\[\]]+/} If I run a bare mongrel (my dev environment) and access my app with http://myhost/wiki/show/Waarom+deze+wiki+%3F%3F, my params are {"name"=>"Waarom deze wiki ??", "action"=>"show", "controller"=>"wiki"}, which is exactly what I expect, but in my production environment (apache 2.2.3 + mod_proxy + mongrel cluster) my params hash is {"name"=>"Waarom deze wiki ", "action"=>"show", "controller"=>"wiki", "?"=>nil} which is incorrect. Looking into request headers here''s what I have found out: Bare mongrel: "REQUEST_URI" =>"/wiki/show/Waarom+deze+wiki+%3F%3F" "PATH_INFO" =>"/wiki/show/Waarom+deze+wiki+%3F%3F" "REQUEST_PATH" =>"/wiki/show/Waarom+deze+wiki+%3F%3F" Apache + mongrel cluster: "REQUEST_URI" => "/wiki/show/Waarom+deze+wiki+??" "PATH_INFO" => "/wiki/show/Waarom+deze+wiki+" "REQUEST_PATH" => "/wiki/show/Waarom+deze+wiki+" Looking at REQUEST_URI of the production environment I am wondering why Apache unescaped the URI before sending it to mongrels. The rewriting rule is standard and used by other similar setups, as far as I know: # Redirect all non-static requests to cluster RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f RewriteRule ^/(.*)$ balancer://portal_cluster%{REQUEST_URI} [P,QSA,L] Does anyone have similar experience? Where should I be looking to change this behavior? Thank you! Production box: Debian stable Mongrel 1.1.1 Rails 1.2.5 apache 2.2.3 Best regards, Yuri Leikind --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Jens Wille
2008-Mar-14 00:08 UTC
Re: Apache + mongrel cluster: early unescaping of URI by Apache
hi yuri! Yuri Leikind [2008-03-03 16:31]:> Does anyone have similar experience? Where should I be looking to > change this behavior?we had a similar issue which i gladly solved today. here''s what i needed to change to make it work: <http://prometheus.khi.uni-koeln.de/trac/pandora/changeset/555> see the references there for more information; particularly, <https://issues.apache.org/bugzilla/show_bug.cgi?id=34602#c16>. hope that helps with your problem, too ;-) cheers jens -- Jens Wille, Dipl.-Bibl. (FH) prometheus - Das verteilte digitale Bildarchiv für Forschung & Lehre Kunsthistorisches Institut der Universität zu Köln Albertus-Magnus-Platz, D-50923 Köln Tel.: +49 (0)221 470-6668, E-Mail: jens.wille-31N1O1AsgN5n68oJJulU0Q@public.gmane.org http://www.prometheus-bildarchiv.de/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---