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 0.9.9 (Zope 2.10 edition)
- transaction.commit(1) is deprecated in favor of transaction.savepoint(). - transaction.commit(1) is deprecated in favor of transaction.savepoint(1).
- Don't break if Python distros ship without profile support (Debian, Ubuntu). - Don't break if Python distros ship without profile support (Debian, Ubuntu).
- Functional.publish() would hang if it got a request_method argument other - Functional.publish() would hang if it got a request_method argument other
than GET or HEAD while omitting the stdin argument. than GET or HEAD while omitting the stdin argument.
...@@ -10,6 +10,8 @@ Zope 2.10 edition ...@@ -10,6 +10,8 @@ Zope 2.10 edition
- Made sure logging is configured. Read $INSTANCE_HOME/log.ini if it exists. - Made sure logging is configured. Read $INSTANCE_HOME/log.ini if it exists.
- Made base.TestCase a new-style class. - Made base.TestCase a new-style class.
- Added placeless.py for Z3-style setup. Thanks to Whit Morriss. - 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) 0.9.8 (Zope 2.8 edition)
- Renamed 'doctest' package to 'zopedoctest' because of name-shadowing - Renamed 'doctest' package to 'zopedoctest' because of name-shadowing
......
...@@ -132,7 +132,7 @@ def http(request_string, handle_errors=True): ...@@ -132,7 +132,7 @@ def http(request_string, handle_errors=True):
# Discard leading white space to make call layout simpler # Discard leading white space to make call layout simpler
request_string = request_string.lstrip() request_string = request_string.lstrip()
# split off and parse the command line # Split off and parse the command line
l = request_string.find('\n') l = request_string.find('\n')
command_line = request_string[:l].rstrip() command_line = request_string[:l].rstrip()
request_string = request_string[l+1:] request_string = request_string[l+1:]
...@@ -162,6 +162,10 @@ def http(request_string, handle_errors=True): ...@@ -162,6 +162,10 @@ def http(request_string, handle_errors=True):
headers = [split_header(header) headers = [split_header(header)
for header in rfc822.Message(instream).headers] for header in rfc822.Message(instream).headers]
# Store request body without headers
instream = StringIO(instream.read())
for name, value in headers: for name, value in headers:
name = ('_'.join(name.upper().split('-'))) name = ('_'.join(name.upper().split('-')))
if name not in ('CONTENT_TYPE', 'CONTENT_LENGTH'): 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