Stuart Bishop wrote:
From reading section 4.2 of http://www.faqs.org/rfcs/rfc2616.html , I
suspect the best way of handling this situation is to concatenate the
duplicate headers into a comma seperated string.


In fact, section 4.2 seems to suggest that proxies are allowed to combine headers using commas. Thanks for discovering that. In light of this, I think it would be better to generate a comma-separated string, as you suggest, rather than interpret overloaded headers as a list. Using a list is more obvious, but seems quite fragile, since code in random places would have to be prepared to accept either a string or a list. isinstance() cruft would appear.

Thinking more... the request should provide two methods, one for retrieving a header value as a string (possibly comma-concatenated), and another for retrieving a header value as a list.

Shane
_______________________________________________
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com

Reply via email to