Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Zope: Dev

Re: [Checkins] SVN: Zope/trunk/ `setHeader('Set-Cookie', ...)` special-casing can die

 

 

Zope dev RSS feed   Index | Next | Previous | View Threaded


stefan at epy

Oct 17, 2011, 2:57 AM

Post #1 of 2 (168 views)
Permalink
Re: [Checkins] SVN: Zope/trunk/ `setHeader('Set-Cookie', ...)` special-casing can die

Hi Martijn,

There are test failures on Zope trunk which look to be connected to your changes.
https://mail.zope.org/pipermail/zope-tests/2011-October/051224.html

Please investigate,

Stefan


On 13.10.2011, at 15:18, Martijn Pieters wrote:

> Log message for revision 123087:
> `setHeader('Set-Cookie', ...)` special-casing can die
>
> Use the cookie APIs or addHeader instead.
>
>
> Changed:
> U Zope/trunk/doc/CHANGES.rst
> U Zope/trunk/src/ZPublisher/HTTPResponse.py
>
> -=-
> Modified: Zope/trunk/doc/CHANGES.rst
> ===================================================================
> --- Zope/trunk/doc/CHANGES.rst 2011-10-13 09:46:28 UTC (rev 123086)
> +++ Zope/trunk/doc/CHANGES.rst 2011-10-13 13:18:32 UTC (rev 123087)
> @@ -50,6 +50,11 @@
> 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.
>
>
> Modified: Zope/trunk/src/ZPublisher/HTTPResponse.py
> ===================================================================
> --- Zope/trunk/src/ZPublisher/HTTPResponse.py 2011-10-13 09:46:28 UTC (rev 123086)
> +++ Zope/trunk/src/ZPublisher/HTTPResponse.py 2011-10-13 13:18:32 UTC (rev 123087)
> @@ -330,13 +330,8 @@
> 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
> + name = literal and name or key
> + self.headers[name] = value
>
> def appendHeader(self, name, value, delimiter=", "):
> """ Append a value to an HTTP return header.
>
> _______________________________________________
> checkins mailing list
> checkins [at] zope
> https://mail.zope.org/mailman/listinfo/checkins

--
Stefan H. Holek
stefan [at] epy





_______________________________________________
Zope-Dev maillist - Zope-Dev [at] zope
https://mail.zope.org/mailman/listinfo/zope-dev
** No cross posts or HTML encoding! **
(Related lists -
https://mail.zope.org/mailman/listinfo/zope-announce
https://mail.zope.org/mailman/listinfo/zope )


mj at zopatista

Oct 17, 2011, 12:23 PM

Post #2 of 2 (171 views)
Permalink
Re: [Checkins] SVN: Zope/trunk/ `setHeader('Set-Cookie', ...)` special-casing can die [In reply to]

On Mon, Oct 17, 2011 at 11:57, Stefan H. Holek <stefan [at] epy> wrote:
> There are test failures on Zope trunk which look to be connected to your changes.
> https://mail.zope.org/pipermail/zope-tests/2011-October/051224.html
>
> Please investigate,

Ugh. Those tests can go, and someone already dealt with them before I
got to them. Mea Culpa!

--
Martijn Pieters
_______________________________________________
Zope-Dev maillist - Zope-Dev [at] zope
https://mail.zope.org/mailman/listinfo/zope-dev
** No cross posts or HTML encoding! **
(Related lists -
https://mail.zope.org/mailman/listinfo/zope-announce
https://mail.zope.org/mailman/listinfo/zope )

Zope dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.