Commit 83c9815b authored by Martijn Pieters's avatar Martijn Pieters

`setHeader('Set-Cookie', ...)` special-casing can die

Use the cookie APIs or addHeader instead.
parent 052e9f3f
......@@ -50,6 +50,11 @@ Features Added
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
``pkg_resources.get_distribution('Zope2').version`` instead.
......
......@@ -330,11 +330,6 @@ class HTTPResponse(BaseResponse):
if not scrubbed:
name, value = _scrubHeader(name, value)
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
self.headers[name] = value
......
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