Re: My eyes are failing me.
Re: My eyes are failing me.
- Subject: Re: My eyes are failing me.
- From: Mike Abdullah <email@hidden>
- Date: Sun, 24 Feb 2019 22:04:25 +0000
> On 22 Feb 2019, at 23:19, Jens Alfke <email@hidden> wrote:
>
>
>
>> On Feb 22, 2019, at 1:07 PM, Alex Zavatone <email@hidden> wrote:
>>
>> It should not show the /api in the description of the URL if it is not going
>> to use it in any call using that URL.
>
> The .baseURL property returns the original URL with the /api path.
>
>> It’s outright misleading and there is nothing in the class docs for NSURL or
>> in the header that indicate this is the intended behavior.
>
> I agree it’s weird. I suspect it reflects an implementation where a relative
> URL is stored as the relative path plus a pointer to the base NSURL object …
> but that’s not really relevant to anyone using it.
>
> It’s been this way forever, or at least since 2001. Feel free to file a
> Radar. But it’s just the .description, so if you ignore that property you’ll
> be OK.
Consider writing something which parses a format like HTML. Inside the
document, URLs may be specified as relative strings to some base URL, rather
than to an absolute URL. e.g. this:
path=“foo/bar.html”
Is interpreted as a path relative to the base URL of the HTML document.
For whatever reason, Apple have chosen to implement NSURL/CFURL to represent
that scenario, rather than storing everything as absolute URLs.
Mike.
_______________________________________________
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