Skip navigation.
 
mlRe: NSURLConnection canHandleRequest: succeeds even with no network
FROM : Sherm Pendley
DATE : Sat May 24 13:25:16 2008

On Sat, May 24, 2008 at 2:11 AM, Mike <<email_removed>> 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

Related mailsAuthorDate
mlNSURLConnection canHandleRequest: succeeds even with no network Mike May 24, 08:11
mlRe: NSURLConnection canHandleRequest: succeeds even with no network Sherm Pendley May 24, 13:25
mlRe: NSURLConnection canHandleRequest: succeeds even with no network Jens Alfke May 24, 23:25