apache/cordova-ios — pull request #57 by thomasyip (2013-05-29 09:02:55+00:00)
Title: Handled redirect case where `didFailLoadWithError with NSURLErrorCancelled` occurs before the redirected `webViewDidStartLoad`.

I was upgrading from Cordova 2.2.0 to 2.7.0. It works fine with the old version, but failed with the upgraded one.

My app redirects (using JavaScript, aka `window.location`) conditions with a localStorage key (login status).

Here was the error I got:

```
Failed to load webpage with error: The operation couldn’t be completed. (NSURLErrorDomain error -999.)
```

Look like the [CB-2698] would fix issue with server-side redirect (eg, HTTP 302).

I triggered the redirect at the client side, `didFailLoadWithError` occurred before the redirected `webViewDidStartLoad`. Apparently, [CB-2698] didn't handle this case.

Hope this pull request would help those who hit the same problem.