[Zope3-checkins] SVN: Zope3/trunk/ Fixed issue 705, double URL unquoting of GET parameters in functional tests.

Albertas Agejevas alga at pov.lt
Tue Sep 5 08:52:12 EDT 2006


Log message for revision 69971:
  Fixed issue 705, double URL unquoting of GET parameters in functional tests.
  

Changed:
  U   Zope3/trunk/doc/CHANGES.txt
  U   Zope3/trunk/src/zope/app/debug/debug.py
  U   Zope3/trunk/src/zope/app/testing/functional.py

-=-
Modified: Zope3/trunk/doc/CHANGES.txt
===================================================================
--- Zope3/trunk/doc/CHANGES.txt	2006-09-05 11:47:10 UTC (rev 69970)
+++ Zope3/trunk/doc/CHANGES.txt	2006-09-05 12:52:11 UTC (rev 69971)
@@ -34,6 +34,9 @@
 
     Bug fixes
 
+      - Fixed issue 705, double URL unquoting of GET parameters in
+        functional tests.
+
       - Fixed issue 676, utilities defined in Zope 3.2 weren't
         converted properly.
 

Modified: Zope3/trunk/src/zope/app/debug/debug.py
===================================================================
--- Zope3/trunk/src/zope/app/debug/debug.py	2006-09-05 11:47:10 UTC (rev 69970)
+++ Zope3/trunk/src/zope/app/debug/debug.py	2006-09-05 12:52:11 UTC (rev 69971)
@@ -18,6 +18,7 @@
 __docformat__ = 'restructuredtext'
 
 import base64, time
+import urllib
 from StringIO import StringIO
 from zope.publisher.publish import publish as _publish, debug_call
 from zope.publisher.browser import TestRequest, setDefaultSkin
@@ -70,6 +71,8 @@
         else:
             raise ValueError("Too many ?s in path", path)
 
+        env['PATH_INFO'] = urllib.unquote(env['PATH_INFO'])
+
         if environment is not None:
             env.update(environment)
 

Modified: Zope3/trunk/src/zope/app/testing/functional.py
===================================================================
--- Zope3/trunk/src/zope/app/testing/functional.py	2006-09-05 11:47:10 UTC (rev 69970)
+++ Zope3/trunk/src/zope/app/testing/functional.py	2006-09-05 12:52:11 UTC (rev 69971)
@@ -24,7 +24,6 @@
 import sys
 import traceback
 import unittest
-import urllib
 from StringIO import StringIO
 from Cookie import SimpleCookie
 from transaction import abort, commit
@@ -549,7 +548,6 @@
         command_line = request_string[:l].rstrip()
         request_string = request_string[l+1:]
         method, path, protocol = command_line.split()
-        path = urllib.unquote(path)
 
         instream = StringIO(request_string)
         environment = {"HTTP_COOKIE": self.httpCookie(path),



More information about the Zope3-Checkins mailing list