Re: Getting the content-type in a HTTP response
Re: Getting the content-type in a HTTP response
- Subject: Re: Getting the content-type in a HTTP response
- From: Dave Carrigan <email@hidden>
- Date: Fri, 25 Jan 2008 15:57:27 -0800
On Jan 25, 2008, at 3:35 PM, Bill Garrison wrote:
I guess you'd have to do something similar with every HTTP header key.
Which I think reinforces my assertion that Apple really was
shortsighted in designing the API, since returning a case-sensitive
dictionary is pretty much useless for the task at hand, since it seems
I have to do a linear search of the dictionary in order to find any
item in it, which is useless and stupid.
If apple had been even remotely close to thinking, they would have at
least downcased all the headers before inserting them into the
dictionary, but it seems like that would have been too visionary.
So my next question is if it's possible to override NSDictionary's
comparison operator to be case insensitive (a la STL's maps) or if I
should just create a new dictionary that copies the old dictionary
with downcased keys. The former would be more bulletproof since it
wouldn't require other programmers to remember to downcase all their
dictionary lookups.
--
Dave Carrigan
email@hidden
Seattle, WA, USA
Attachment:
PGP.sig
Description: This is a digitally signed message part
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden