HTTP extensions to NSMutableURLRequest erroneously modify headers
HTTP extensions to NSMutableURLRequest erroneously modify headers
- Subject: HTTP extensions to NSMutableURLRequest erroneously modify headers
- From: email@hidden
- Date: Tue, 26 Jul 2005 01:13:51 +1000
The setValue:forHTTPHeaderField: method provided by the
NSMutableHTTPURLRequest category of NSMutableURLRequest automatically
converts the header names to titlecase, e.g. "sample-value" becomes
"Sample-value". I don't much care about the validity of this from
the point of view of the HTTP protocol - I'm working with BitTorrent
trackers, and they are case sensitive, expecting lowercase header
names. Is there any way I can work around this? Since this is added
in a category - and the capitalisation is being performed by the
category method, looking at the disassembly - I'm not sure how I can
override it.... I guess I'll have to override something further along
in the request process, to restore the header names to the original
values. Any thoughts?
I've tried poking around with NSHTTPURLProtocol, where the headers
are ultimately stored, but I'm missing a piece of the puzzle... while
header values are set via the setProperty:forKey:inRequest: class
method (with the header name as the key), this isn't enough to have
the original NSMutableHTTPURLRequest notice them... there's some
other storage somewhere I've missed.
Wade Tregaskis (AIM/iChat, Yahoo & Skype: wadetregaskis, ICQ:
40056898, MSN: email@hidden, AV iChat & email:
email@hidden, Jabber: email@hidden)
-- Sed quis custodiet ipsos custodes?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden