Hello everyone!

I've developed a web2py backend which is given me problems with special 
chars in URLs. I'm a newbie with web2py so maybe I'm missing something very 
easy, sorry if that is the case ;-).

These are the details of my app.

- I have no routes.py file.

- In controllers/default.py I have this:


...
public_services=Service()
private_services=Service()
...
def public_call(): 
    return public_services()

@auth.requires_login()
def private_call(): 
    return private_services()
...
@public_services.json
def public_function_1(var1, var2, var3):
...
@private_services.json
def private_function_1(var1, var2):
...


- I call these methods this way:

http://mydomain/myapp/default/public_call/json/
public_function_1/var1/var2/var3
http://mydomain/myapp/default/private_call/json/private_function_1/var1/var2

- Everything is working except if my URL contains special chars, (var1, 
var2 or var3 can contain 'ñ' or accents, coded with %...) then I get an 
"invalid request" error.

- After reading all posts related to this issue I'm a bit lost, sorry. I've 
tried to create a routes.py and the only line inside it is this:
routes_apps_raw=['myapp']

But obviously this is not enough because I have the same problem yet.

Besides this, I don't understand the "request.raw_args" thing, am I 
supposed to do anything with that? I can't see any request.raw_args in my 
code.

Thank you very much and kind regards!

-- 

--- 
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