Hi devs,

Currenty symfony can create urls containing urlencoded slash (%2F),
which does not work for apache*, it throws right away 404 without even
looking at rewrite rules. This can be seen for example in sfSimpleCMS
plugin, where publich/unpublish/delete actions don't work for slugs
containing /

I don't think urlencoding of slash is necessery:
- symfony will receive decoded slash in either case (in case it's
encoded, AllowEncodedSlashes must be On)
- for parameters that might contain slash, "requirements: { paramname:
'.*'}" is required in routing configuration, and this will "eat" the
rest of the url, be it encoded or not.

I propose this change in controller/sfRouting.class.php - just before
return from generate() function, remove encoding of slash:

    $real_url = str_ireplace('%2F', '/', $real_url);

Any comments on this?

-- Marek


* It's possible to set AllowEncodedSlashes to On, but this setting is
only per server and vhost, and most hosts don't allow changing vhosts
sections.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-devs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to