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
83c9815b
Commit
83c9815b
authored
Oct 13, 2011
by
Martijn Pieters
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
`setHeader('Set-Cookie', ...)` special-casing can die
Use the cookie APIs or addHeader instead.
parent
052e9f3f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
doc/CHANGES.rst
doc/CHANGES.rst
+5
-0
src/ZPublisher/HTTPResponse.py
src/ZPublisher/HTTPResponse.py
+2
-7
No files found.
doc/CHANGES.rst
View file @
83c9815b
...
@@ -50,6 +50,11 @@ Features Added
...
@@ -50,6 +50,11 @@ Features Added
Restructuring
Restructuring
+++++++++++++
+++++++++++++
- Removed the special handling of `Set-Cookie` headers in
`HTTPResponse.setHeader`. Use the `setCookie`/`appendCookie`/`expireCookie`
methods instead, or if low-level control is needed, use `addHeader` instead
to get the exact same effect.
- Removed the `App.version_txt.getZopeVersion` API, you can use
- Removed the `App.version_txt.getZopeVersion` API, you can use
``pkg_resources.get_distribution('Zope2').version`` instead.
``pkg_resources.get_distribution('Zope2').version`` instead.
...
...
src/ZPublisher/HTTPResponse.py
View file @
83c9815b
...
@@ -330,11 +330,6 @@ class HTTPResponse(BaseResponse):
...
@@ -330,11 +330,6 @@ class HTTPResponse(BaseResponse):
if
not
scrubbed
:
if
not
scrubbed
:
name
,
value
=
_scrubHeader
(
name
,
value
)
name
,
value
=
_scrubHeader
(
name
,
value
)
key
=
name
.
lower
()
key
=
name
.
lower
()
# The following is crazy, given that we have APIs for cookies.
# Special behavior will go away in Zope 2.13
if
key
==
'set-cookie'
:
self
.
accumulated_headers
.
append
((
name
,
value
))
else
:
name
=
literal
and
name
or
key
name
=
literal
and
name
or
key
self
.
headers
[
name
]
=
value
self
.
headers
[
name
]
=
value
...
...
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