D
Darren Spruell
Spent some time tripping today over HTTP headers being added to the
Request object in "proper" header case (all components title cased)
but finding that the resulting header dictionary object had the
headers keyed with first component only capitalized.
## http://paste.pound-python.org/show/3273/
'Big Poopy'
I'd expect the header put in as "User-Agent" to be stored and
retrieved using the same case but this is clearly not the case. HTTP
header names are case-insensitive so it matters not how they're sent
but programmatically it would seem like we'd want to ensure that the
specified input is preserved.
http://www.cs.tut.fi/~jkorpela/http.html
http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2
This is observed under Python 2.6.1 and 2.6.6 on OS X and Linux.
Am I misunderstanding how to use these functions? Do I need to adjust
my expectations?
Request object in "proper" header case (all components title cased)
but finding that the resulting header dictionary object had the
headers keyed with first component only capitalized.
## http://paste.pound-python.org/show/3273/
'Big Poopy'
I'd expect the header put in as "User-Agent" to be stored and
retrieved using the same case but this is clearly not the case. HTTP
header names are case-insensitive so it matters not how they're sent
but programmatically it would seem like we'd want to ensure that the
specified input is preserved.
http://www.cs.tut.fi/~jkorpela/http.html
http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2
This is observed under Python 2.6.1 and 2.6.6 on OS X and Linux.
Am I misunderstanding how to use these functions? Do I need to adjust
my expectations?