Re: What generates NSURLErrorUnsupportedURL?
Re: What generates NSURLErrorUnsupportedURL?
- Subject: Re: What generates NSURLErrorUnsupportedURL?
- From: Greg Parker <email@hidden>
- Date: Wed, 08 Feb 2017 19:16:20 -0800
> On Feb 8, 2017, at 2:44 PM, Jens Alfke <email@hidden> wrote:
>
>> On Feb 8, 2017, at 10:38 AM, Steve Christensen <email@hidden> wrote:
>>
>> The time between when the request is made and when it completes with an error might be a minute or so, so the framework is immediately bailing on the request. I'm wondering what part of the process generates the error. Does the server return a non-200 status code or what?
>
> The server is probably returning a redirect (301, 302 or 303) to a bogus URL.
NSURLErrorUnsupportedURL in a background session is specifically a complaint that the URL is neither http nor https. Perhaps the server redirected to something else?
> There’s a delegate method you can implement to see the redirected URL, which could help you troubleshoot this. But it sounds like it’s the server’s fault.
The bad URL is also recorded in the NSError's userInfo dictionary as NSURLErrorFailingURLStringErrorKey.
--
Greg Parker email@hidden Runtime Wrangler
_______________________________________________
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