You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to gev...@googlegroups.com
I am trying to use the information from the pywsgi server in order to implement a digest authentication. And I am meeting some problems that I do not know how to solve elegantly. For example if the URI sent to the server is something like "/test%20(2).txt" the PyWSGI will unqote it and save it in env['PATH_INFO'] as "/test (2).txt". So far so good. In order to build correct digest authentication I need to know the correct original URI. So I tried to use urllib.quote(env['PATH_INFO']) but this one produces a string(/test%20%282%29.txt) the differs from the original one(/test%20(2).txt). Any idea how I can get the original one without hacking the pywsgi server and set it as a key in the env dict?
Regards,
Gal
Denis Bilenko
unread,
May 21, 2013, 12:14:57 PM5/21/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to gev...@googlegroups.com
Basically, this is the flaw in WSGI spec - as is it does not store
unquote path info in environ. I had similar problem and I ended up
using this class: https://gist.github.com/denik/5621051
galfy
unread,
May 24, 2013, 4:19:05 AM5/24/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to gev...@googlegroups.com
Thank you Denis, the suggestion above worked for me.