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: John Joyce <email@hidden>
- Date: Fri, 25 Jan 2008 18:49:13 -0600
As was stated earlier, simply do a case-insensitive search of the
dictionary. Although the http officially is supposed to be case-
insensitive, you will notice that some servers do send out data with
case maintained. Many web sites do this. It isn't correct, and it
shouldn't be done, but you sometimes standards and reality are not
the same thing. I would suggest that it is an advantage that the case
is maintained in response you get, just perfect for cases where it
does matter due to those sites and web services out there that ignore
standards and just do things as they wish.
Although not all will honor case sensitive responses, many will.
Web browsers are a good example of user-agent software that are
pretty impressive at handling data that often does not follow
standards and should not be rendered as a web page at all.
Just keep in mind that http and html have long been defined and
implemented very loosely (to say the least), so we have what we have
today, which is a messy world to deal with. As a result, the onus is
on us to work with what we get.
If you receive a response that contains case-sensitive data, you
might do well to honor it, since that server may well expect to
receive requests in the same manner.
_______________________________________________
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