-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

i think the doc about routing still needs some love:
http://symfony.com/doc/2.0/book/routing.html

a section about the pattern separators would be helpful, with examples
like this one or the famous "catchall" as in

example:
    pattern:   /cms/{path}
    defaults:  { _controller: SomeBundle:Example:show }
    requirements:
        path: '.*'

by, the way, i get the path without the leading "/" when my pattern is
    pattern:   "{path}"
    requirements:
        path: '.*'
sounds like a but to me, if i can cover later / with my path regexp, why
not the first one?

cheers,
david


Am 16.04.2011 21:50, schrieb Jordi Boggiano:
> On 16.04.2011 09:14, Theo Chakkapark wrote:
>> I have a routing definition that's pretty standard:
>>
>> example:
>>     pattern:   /test/{email_address}
>>     defaults:  { _controller: SomeBundle:Example:show }
>>
>> When doing something like
>> /test/t...@test.com
>>
>> The controller is not able to pick it up. Even urlencoding/decoding
>> does not work (does not seem to like the period in the email).
>>
>> Any pointers?
>>
>> There seems to be a solution for Symfony 1.x where you omit certain
>> lines in .htaccess, but those lines do not exist in the Symfony
>> 2.x .htaccess
> 
> 
> By default the dot is used as a pattern separator, so it's not matched.
> In this case you should override the requirements for that parameter as
> such:
> 
> example:
>     pattern:   /test/{email_address}
>     defaults:  { _controller: SomeBundle:Example:show }
>     requirements:
>         email_address: '.+@.+'
> 
> Note that this is a regex pattern, .+ would suffice, but you might as
> well validate that there is at least an @ in there while you're at it.
> 
> Cheers
> 

- -- 
Liip AG // Agile Web Development // T +41 26 422 25 11
CH-1700 Fribourg // PGP 0xA581808B // www.liip.ch
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk2qpukACgkQqBnXnqWBgIvQYACgnr4MpCA7untoQVA33cdFShRA
QB0AmgKn/5ayuDAsfdfu0YFh2Xvmj4QA
=fY7B
-----END PGP SIGNATURE-----

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

Reply via email to