[Twisted-Python] stupid case sensitive web clients

[This time with a subject line!]
Jeff Epler wrote:
Bob Ippolito wrote:
I have a stupid device that's talking to a Twisted web server that demands HTTP headers to be capitalized Like-This, however Twisted only capitalizes the first character..
[...]
Any chance someone could patch that up?
Doubtful.
http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2 "Field names are case-insensitive"
Nevertheless the headers are almost always presented in the HTTP spec and other reference materials in the style 'Content-Type'. I would guess therefore that this style will be the one most widely adopted by those broken clients that expect a particular capitalisation.
Hamish Lawson

Hi,
Hamish Lawson:
I have a stupid device that's talking to a Twisted web server that demands HTTP headers to be capitalized Like-This
Ouch. What does the manufacturer of said stupid device have to say about this?
Nevertheless the headers are almost always presented in the HTTP spec and other reference materials in the style 'Content-Type'. I would guess therefore that this style will be the one most widely adopted by those broken clients that expect a particular capitalisation.
Personally, I'd rather send them as cOnTeNt-tYpE on principle, so that those idiot devices / programs actually get _fixed_ sometime. :-/

On Friday, Nov 15, 2002, at 07:22 America/New_York, Matthias Urlichs wrote:
Hi,
Hamish Lawson:
I have a stupid device that's talking to a Twisted web server that demands HTTP headers to be capitalized Like-This
Ouch. What does the manufacturer of said stupid device have to say about this?
Nothing worthwhile, I made them rewrite their protocol entirely (from a bastardized nonworking SOAP-like XML based protocol to a relatively optimized binary protocol that makes sense), but I still have older devices that I need to use from time to time. I'd like to be able to use them (a) without modifying my twisted install and (b) without writing a new protocol entirely.
-bob
participants (3)
-
Bob Ippolito
-
Hamish Lawson
-
Matthias Urlichs