Commit 489ec269 authored by Stefan H. Holek's avatar Stefan H. Holek

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.
parent 67f13e9a
Zope 2.10 edition
- transaction.commit(1) is deprecated in favor of transaction.savepoint().
0.9.9 (Zope 2.10 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 @@ Zope 2.10 edition
- 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
......
......@@ -132,7 +132,7 @@ def http(request_string, handle_errors=True):
# 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 @@ def http(request_string, handle_errors=True):
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'):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment