On 4 Dec 2013, at 2:25 PM, luciano <feo.luci...@gmail.com> wrote:

> Hello, I'm writing an app using web2py and I would need to accept a full URL 
> as a get parameter, so in case the following request is received: 
> "http://www.mysite.com/http://www.google.com/";
> a controller function should be called with the value 
> "http://www.google.com/"; as an argument.
> 
> Is this achievable through web2py?

In principle, you should be able to do something like 
http://www.mysite.com?url=http://www.google.com/, as long as you encode the URL 
thus:

http://www.mysite.com?url=http://www.google.com/?url=http%3A%2F%2Fwww.google.com%2F

However, at least by default you'll run afoul of web2py's URL syntax checker. 
You can avoid that by using the parameter-based router. Still, it's tricky, 
partly because proper url-encoding is absolutely mandatory; otherwise the 
result can be ambiguous.

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to