apache/incubator-cordova-ios — pull request #57 by pmuellr (2012-10-09 19:37:19+00:00)
Title: CB-1600 - fix crash on iOS 4.3 in file transfer

https://issues.apache.org/jira/browse/CB-1600

Did two basic things here:

1) add whitelist check before CDVFileTransfer#download/upload even start,
to prevent the confusing behavior of whitelist checking in the middle of
the download

2) in the case where the whitelist passes, but gets one of the error
conditions that we originally saw the crash in, add some extra protection
to the cast in CDVFileTransfer#connection:didReceiveResponse:
of NSURLResponse to NSHTTPURLResponse, since sometimes it isn't one.