• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Getting the content-type in a HTTP response
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Getting the content-type in a HTTP response
      • From: Nir Soffer <email@hidden>
    • Re: Getting the content-type in a HTTP response
      • From: Andy Lee <email@hidden>
    • Re: Getting the content-type in a HTTP response
      • From: "Kyle Sluder" <email@hidden>
References: 
 >Getting the content-type in a HTTP response (From: Dave Carrigan <email@hidden>)
 >Re: Getting the content-type in a HTTP response (From: Bill Garrison <email@hidden>)

  • Prev by Date: Re: The mouse is where?
  • Next by Date: Re: The mouse is where?
  • Previous by thread: Re: Getting the content-type in a HTTP response
  • Next by thread: Re: Getting the content-type in a HTTP response
  • Index(es):
    • Date
    • Thread