Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
4f1ca2a3
Commit
4f1ca2a3
authored
Sep 24, 2005
by
Andreas Jung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Collector #1864, #1906: fixed header normalization in appendHeader()
parent
f6fc2508
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
1 deletion
+13
-1
doc/CHANGES.txt
doc/CHANGES.txt
+2
-0
lib/python/ZPublisher/HTTPResponse.py
lib/python/ZPublisher/HTTPResponse.py
+1
-1
lib/python/ZPublisher/tests/testHTTPResponse.py
lib/python/ZPublisher/tests/testHTTPResponse.py
+10
-0
No files found.
doc/CHANGES.txt
View file @
4f1ca2a3
...
@@ -31,6 +31,8 @@ Zope Changes
...
@@ -31,6 +31,8 @@ Zope Changes
Bugs Fixed
Bugs Fixed
- Collector #1864, #1906: fixed header normalization in appendHeader()
- Collector #1899: fixed migration issue when using export/import for
- Collector #1899: fixed migration issue when using export/import for
ZCatalog instances
ZCatalog instances
...
...
lib/python/ZPublisher/HTTPResponse.py
View file @
4f1ca2a3
...
@@ -544,7 +544,7 @@ class HTTPResponse(BaseResponse):
...
@@ -544,7 +544,7 @@ class HTTPResponse(BaseResponse):
Sets an HTTP return header "name" with value "value",
Sets an HTTP return header "name" with value "value",
appending it following a comma if there was a previous value
appending it following a comma if there was a previous value
set for the header. '''
set for the header. '''
name
=
str
(
name
)
name
=
str
(
name
)
.
lower
()
value
=
str
(
value
)
value
=
str
(
value
)
headers
=
self
.
headers
headers
=
self
.
headers
...
...
lib/python/ZPublisher/tests/testHTTPResponse.py
View file @
4f1ca2a3
...
@@ -65,6 +65,16 @@ class HTTPResponseTests(unittest.TestCase):
...
@@ -65,6 +65,16 @@ class HTTPResponseTests(unittest.TestCase):
self
.
assertEqual
(
cookie
.
get
(
'value'
),
'bar:baz'
)
self
.
assertEqual
(
cookie
.
get
(
'value'
),
'bar:baz'
)
self
.
assertEqual
(
cookie
.
get
(
'path'
),
'/'
)
self
.
assertEqual
(
cookie
.
get
(
'path'
),
'/'
)
def
test_appendHeader
(
self
):
response
=
self
.
_makeOne
()
response
.
setHeader
(
'foo'
,
'bar'
)
response
.
appendHeader
(
'foo'
,
'foo'
)
self
.
assertEqual
(
response
.
headers
.
get
(
'foo'
),
'bar,
\
n
\
t
foo'
)
response
.
setHeader
(
'xxx'
,
'bar'
)
response
.
appendHeader
(
'XXX'
,
'foo'
)
self
.
assertEqual
(
response
.
headers
.
get
(
'xxx'
),
'bar,
\
n
\
t
foo'
)
def
test_suite
():
def
test_suite
():
suite
=
unittest
.
TestSuite
()
suite
=
unittest
.
TestSuite
()
suite
.
addTest
(
unittest
.
makeSuite
(
HTTPResponseTests
,
'test'
))
suite
.
addTest
(
unittest
.
makeSuite
(
HTTPResponseTests
,
'test'
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment