[Web-SIG] Why is response_headers a list instead of a dict?

Clark C. Evans cce at clarkevans.com
Sun Dec 25 20:21:59 CET 2005


Thank you for taking time to respond Phillip.

On Sun, Dec 25, 2005 at 02:13:00PM -0500, Phillip J. Eby wrote:
| WSGI puts this particular power in the application writer's hands, 
| because then *they* can fix a problem.  If it's in the server author's 
| hands, the application writer can be screwed, whether the server is open 
| source or not.
}
| Having it be ugly and primitive was both necessary and intentional.

Ok.

| In any case, the point is moot; this isn't a compatible change to the 
| spec, so it would have to wait for a WSGI 2.0.

Right; it's quite a large change.  Also, my sample set was limited to
mostly sites that didn't use 'long-lasting' cookies.  It seems that
Microsoft's SDK still uses 'expires' in their Set-Cookie header [1],
despite almost 8 years of it being expliclty removed from the RFC.

| If you want a friendly API for WSGI header management, please see the 
| wsgiref.headers.Headers class, which offers a dictionary-like interface 
| to manipulate a WSGI header list.

I'll have a look at it; thanks.

Best,

Clark

[1] http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wininet/wininet/http_cookies.asp


More information about the Web-SIG mailing list