[Zope3-checkins] SVN: Zope3/branches/testbrowser-integration/src/zope/testbrowser/testing.py Make sure that empty URLs are really getting the root.

Stephan Richter srichter at cosmos.phy.tufts.edu
Wed Sep 21 21:44:40 EDT 2005


Log message for revision 38561:
  Make sure that empty URLs are really getting the root.
  
  

Changed:
  U   Zope3/branches/testbrowser-integration/src/zope/testbrowser/testing.py

-=-
Modified: Zope3/branches/testbrowser-integration/src/zope/testbrowser/testing.py
===================================================================
--- Zope3/branches/testbrowser-integration/src/zope/testbrowser/testing.py	2005-09-22 01:41:02 UTC (rev 38560)
+++ Zope3/branches/testbrowser-integration/src/zope/testbrowser/testing.py	2005-09-22 01:44:39 UTC (rev 38561)
@@ -45,6 +45,9 @@
         if body is None:
             body = ''
 
+        if url == '':
+            url = '/'
+
         # Extract the handle_error option header
         handle_errors_key = 'X-zope-handle-errors'
         handle_errors = headers.get(handle_errors_key, True)
@@ -61,7 +64,7 @@
             headers = ''
 
         # Construct the full HTTP request string, since that is what the
-        # ``HTTPCaller`` wants. 
+        # ``HTTPCaller`` wants.
         request_string = (method + ' ' + url + ' HTTP/1.1\n'
                           + headers + '\n' + body)
         self.response = self.caller(request_string, handle_errors)



More information about the Zope3-Checkins mailing list