kevinsl / wsgi-intercept

Automatically exported from code.google.com/p/wsgi-intercept
Other
0 stars 0 forks source link

'+' removed from path #11

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
'+' is removed from the path in make_environ because it uses
urllib.unquote_plus on the path and the query string.

When using zope we need '+' to be able to use namespaces in URL's.

It is not clear why unquote_plus is used here, because every webserver
forwards '+' as is.

The following diff solves the problem :

Index: wsgi_intercept/__init__.py
===================================================================
--- wsgi_intercept/__init__.py  (revision 44)
+++ wsgi_intercept/__init__.py  (working copy)
@@ -333,10 +333,10 @@
         url = url[len(script_name):]

     url = url.split('?', 1)
-    path_info = urllib.unquote_plus(url[0])
+    path_info = url[0]
     query_string = ""
     if len(url) == 2:
-        query_string = urllib.unquote_plus(url[1])
+        query_string = url[1]

     if debuglevel:
         print "method: %s; script_name: %s; path_info: %s; query_string:
%s" % (method, script_name, path_info, query_string)

Original issue reported on code.google.com by juergen....@gmail.com on 8 Apr 2008 at 12:33

GoogleCodeExporter commented 8 years ago
huh.  I don't know why `+' is stripped either.  It was left over from twill so 
I'll
try to figure out why.  But my first instinct is to go ahead with this patch.

Original comment by kumar.mcmillan on 8 Apr 2008 at 10:18

GoogleCodeExporter commented 8 years ago
sorry for the delay, fixed and released as 0.3.4.  easy_install -U 
wsgi_intercept to
grab the change

Original comment by kumar.mcmillan on 21 Apr 2008 at 4:16

GoogleCodeExporter commented 8 years ago
Thanks for the fix.

Works perfect now.

Original comment by juergen....@gmail.com on 21 Apr 2008 at 8:20