Yes. in web2py URL are validated and special characters are not
allowed (by default). Spaces are replaced with _.
This can be changed by mappying parts of the URL, like the part after
the comma, into a variable. Example:

http://127.0.0.1:8000/a/b/c,d

you can create a file routes.py in web2py/ and in it

routes_in=(('(?P<p>.*?),(?P<q>.*)':'\g<p>?other=\g<q>'),)

then in app a, controller b.py and function c you can access

request.vars.other

which will contain 'd'.

Massimo


On Aug 31, 6:38 pm, "mr.freeze" <[email protected]> wrote:
> It fails for me when passed as an argument even when it is URL
> encoded:http://127.0.0.1:8000/test/default/index/london%2C_ontario- Invalid
> request.
>
> Passing as a query string works even when not 
> encoded:http://127.0.0.1:8000/test/default/index?city=london,_ontario- Works
> fine.
>
> Massimo, can you confirm that this is the expected behavior?
>
> On Aug 31, 7:56 am, mdipierro <[email protected]> wrote:
>
> > Your url does not pass validation and it is invalid. To allow this you
> > must create a routes_in for fit.
>
> > On Aug 30, 9:20 pm, Derek <[email protected]> wrote:
>
> > > Hi,
>
> > > I'm doing some geocoding. I have a geocoder.py file with an index
> > > function.
>
> > > A url like:
>
> > > /geocoder/index/london
>
> > > uses the value 'london' (stored in request.args[0]) just fine. But if
> > > I add acomma, as in:
>
> > > /geocoder/index/london,_ontario
>
> > > I get an "Invalid request" error. It's not even a web2py ticket.
>
> > > Any thoughts?
>
> > > Thanks,
>
> > > Derek
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py-users" 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/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to