[Web-SIG] Re: Pending modifications to PEP 333

Denis S. Otkidach ods at strana.ru
Mon Aug 30 17:33:09 CEST 2004


On Mon, 30 Aug 2004 10:04:52 -0400
Steve Holden <steve at holdenweb.com> wrote:

> [...]
> > 
> >     def __getitem__(self, key):
> >         '''Get header. If there are several header with the same key, their
> >         values are joined.'''
> >         # RFC 2616, 4.2 Message Headers
> >         return ', '.join(self._headers_map[key.lower()])
> > 
> [...]
> Since this module has seen productions use, can we take it you've had no 
> problem joining cookie values with dates containing commas? This was one 
> of the arguments for maintaining separate multiple headers of the same 
> type, IIRC.

As you can see we do maintain separate headers with the same name.  So there
is no problem with Set-Cookie header.  Here should be method like
FieldStorage.getlist() for completeness, but we didn't ever need it.

-- 
Denis S. Otkidach
http://www.python.ru/      [ru]


More information about the Web-SIG mailing list