HTTP headers are indeed case insensitive by specification. However, I
have worked on commercial projects in the past where the producers or
consumers of HTTP are embedded devices with firmware written in sloppy
C by people that don't really know what the hell they're doing... and
they're tested by hand against Whatever IIS and IE Do, so of course
the firmware works correctly, it's tested!
I'm talking about code that looks like:
if (!strcmp(header, "Content-Type")) { ... }
My guess is that Nick has a similarly horrifying scenario on his hands :)
(The particular device I'm remembering to also had a "SOAP"
implementation which was even more brain damaged. It of course didn't
use an XML parser or generator anywhere).
-bob
On 1/8/07, Elvelind Grandin <[EMAIL PROTECTED]> wrote:
HTTP Headers are as far as I know case insensitive. so it's a bug in
the older project. I dont think you can force CP into sending
uppercase headers.
On 1/8/07, Nick Murdoch <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> For compatibility reasons with an older project, I'm trying to get
> CherryPy to return a header in uppercase, eg:
> X-UPPERCASE-TEST: Hello!
>
> My code for this looks something like this:
> class Root(controllers.RootController)
> @expose(....)
> def index(self, *args, **kw):
> cherrypy.response.headers['X-UPPERCASE-TEST'] = 'Hello!'
>
> My problem is that the header is being returned as Title Case by the
> server, and I'm not sure why:
>
> $ wget -S http://etc.etc.etc:8080/
> ...
> X-Uppercase-Test: Hello!
>
>
> Could anyone suggest what's going on here? I'm I'm truly breaking
> standards here I could switch to using Title Case, but it'd be a pain
> to. I'm using TG 1.0b1
>
> Thanks and regards,
>
> Nick Murdoch
>
>
> >
>
--
cheers
elvelind grandin
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---