• 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: Re: URLWithString fails to fails with bad string
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Re: URLWithString fails to fails with bad string


  • Subject: Re: Re: URLWithString fails to fails with bad string
  • From: email@hidden
  • Date: Wed, 25 Nov 2009 16:31:28 +0000

On Nov 25, 2009 2:06am, Kyle Sluder <email@hidden> wrote:
On Tue, Nov 24, 2009 at 10:14 PM, email@hidden> wrote:

> This returns a non-nil value:

> NSURL * url = [NSURL URLWithString:@"sdsds"];

>

> The docs say this should fail. RFC 1758 looks for the string to begin with a

> scheme, eg http:



While "sdsds" is indeed a valid relative URL according to RFC 2396,

don't let NSURL's declaration of RFC-conformance fool you. I have a

pretty severe bug (rdar://problem/7096953) logged against NSURL's

incorrect handling of IDNs. Despite pointing to the spec, copying it

into the bug report, and walking step by step through NSURL's

violation thereof, I was told that it behaves according to the spec

and as designed. I no longer trust NSURL's assertions of conformance.



--Kyle Sluder


So is there a way to validate a string before passing it to URLWithString?
_______________________________________________

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: URLWithString fails to fails with bad string
      • From: Jens Alfke <email@hidden>
References: 
 >Re: URLWithString fails to fails with bad string (From: Kyle Sluder <email@hidden>)

  • Prev by Date: Re: Drawing: The Right place to keep bounds
  • Next by Date: Re: URLWithString fails to fails with bad string
  • Previous by thread: Re: URLWithString fails to fails with bad string
  • Next by thread: Re: URLWithString fails to fails with bad string
  • Index(es):
    • Date
    • Thread