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
7797da19
Commit
7797da19
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
0fee057d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
1 deletion
+11
-1
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.
lib/python/ZPublisher/HTTPResponse.py
View file @
7797da19
...
...
@@ -544,7 +544,7 @@ class HTTPResponse(BaseResponse):
Sets an HTTP return header "name" with value "value",
appending it following a comma if there was a previous value
set for the header. '''
name
=
str
(
name
)
name
=
str
(
name
)
.
lower
()
value
=
str
(
value
)
headers
=
self
.
headers
...
...
lib/python/ZPublisher/tests/testHTTPResponse.py
View file @
7797da19
...
...
@@ -65,6 +65,16 @@ class HTTPResponseTests(unittest.TestCase):
self
.
assertEqual
(
cookie
.
get
(
'value'
),
'bar:baz'
)
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
():
suite
=
unittest
.
TestSuite
()
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