[Zope-dev] bug in RESPONSE.appendHeader
Chris Gray
cpgray@library.uwaterloo.ca
Wed, 12 Jun 2002 13:07:13 -0400 (EDT)
First off, the on-line documentation description of this method is 'Append
a value to a cookie'.
Second, it breaks if you are in fact adding a second value to a header
that already exists.
Either:
<dtml-call "RESPONSE.setHeader('x-i-made-this','1013')">
<dtml-call "RESPONSE.appendHeader('x-i-made-this','1121')">
or:
<dtml-call "RESPONSE.appendHeader('x-i-made-this','1013')">
<dtml-call "RESPONSE.appendHeader('x-i-made-this','1121')">
causes an error because of what looks like a typo.
/lib/python/ZPublisher/HTTPResponse.py(line 391)
reads: h=self.header[name]
but should be: h=self.headers[name]
Chris