Re: NSURLConnection canHandleRequest: succeeds even with no network
Re: NSURLConnection canHandleRequest: succeeds even with no network
- Subject: Re: NSURLConnection canHandleRequest: succeeds even with no network
- From: "Sherm Pendley" <email@hidden>
- Date: Sat, 24 May 2008 07:25:16 -0400
On Sat, May 24, 2008 at 2:11 AM, Mike <email@hidden> wrote:
> Why does [ NSURLConnection canHandleRequest: ] return YES even if I turn
> off all my network connections? I thought this method was supposed to be
> used for preflighting connection requests?
>From what I gather, the "preflight" referred to in the docs is just a check
to see if a protocol class is registered to handle the scheme (http:, file:,
etc.). That is, it tells you if the proper machinery is in place to
*attempt* the connection, not whether the attempt will succeed or not. It
allows you to distinguish between "I don't grok gopher" and actual
network-layer errors.
sherm--
--
Cocoa programming in Perl: http://camelbones.sourceforge.net
_______________________________________________
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