[Zope-Checkins] SVN: Zope/trunk/lib/python/Testing/ZopeTestCase/ Merged r69932:69933 from 2.8 branch.

Stefan H. Holek stefan at epy.co.at
Sat Sep 2 11:52:41 EDT 2006


Log message for revision 69936:
  Merged r69932:69933 from 2.8 branch.
  
  Fixed functional.http to only pass the request body (no headers) to
  publish_module. Thanks to Andreas Zeidler.
  

Changed:
  U   Zope/trunk/lib/python/Testing/ZopeTestCase/doc/CHANGES.txt
  U   Zope/trunk/lib/python/Testing/ZopeTestCase/zopedoctest/functional.py

-=-
Modified: Zope/trunk/lib/python/Testing/ZopeTestCase/doc/CHANGES.txt
===================================================================
--- Zope/trunk/lib/python/Testing/ZopeTestCase/doc/CHANGES.txt	2006-09-02 15:50:57 UTC (rev 69935)
+++ Zope/trunk/lib/python/Testing/ZopeTestCase/doc/CHANGES.txt	2006-09-02 15:52:40 UTC (rev 69936)
@@ -1,5 +1,5 @@
-Zope 2.10 edition
-- transaction.commit(1) is deprecated in favor of transaction.savepoint().
+0.9.9 (Zope 2.11 edition)
+- transaction.commit(1) is deprecated in favor of transaction.savepoint(1).
 - Don't break if Python distros ship without profile support (Debian, Ubuntu).
 - Functional.publish() would hang if it got a request_method argument other
   than GET or HEAD while omitting the stdin argument.
@@ -10,6 +10,8 @@
 - Made sure logging is configured. Read $INSTANCE_HOME/log.ini if it exists.
 - Made base.TestCase a new-style class.
 - Added placeless.py for Z3-style setup. Thanks to Whit Morriss.
+- Fixed functional.http to only pass the request body (no headers) to
+  publish_module. Thanks to Andreas Zeidler.
 
 0.9.8 (Zope 2.8 edition)
 - Renamed 'doctest' package to 'zopedoctest' because of name-shadowing

Modified: Zope/trunk/lib/python/Testing/ZopeTestCase/zopedoctest/functional.py
===================================================================
--- Zope/trunk/lib/python/Testing/ZopeTestCase/zopedoctest/functional.py	2006-09-02 15:50:57 UTC (rev 69935)
+++ Zope/trunk/lib/python/Testing/ZopeTestCase/zopedoctest/functional.py	2006-09-02 15:52:40 UTC (rev 69936)
@@ -132,7 +132,7 @@
     # Discard leading white space to make call layout simpler
     request_string = request_string.lstrip()
 
-    # split off and parse the command line
+    # Split off and parse the command line
     l = request_string.find('\n')
     command_line = request_string[:l].rstrip()
     request_string = request_string[l+1:]
@@ -162,6 +162,10 @@
 
     headers = [split_header(header)
                for header in rfc822.Message(instream).headers]
+
+    # Store request body without headers
+    instream = StringIO(instream.read())
+
     for name, value in headers:
         name = ('_'.join(name.upper().split('-')))
         if name not in ('CONTENT_TYPE', 'CONTENT_LENGTH'):



More information about the Zope-Checkins mailing list