You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by "Shazron Abdullah (JIRA)" <ji...@apache.org> on 2012/06/21 00:07:42 UTC
[jira] [Resolved] (CB-942) iOS failing FileTransfer malformed URL
tests
[ https://issues.apache.org/jira/browse/CB-942?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Shazron Abdullah resolved CB-942.
---------------------------------
Resolution: Fixed
Fix commit - http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/commit/2d9bcb6e
> iOS failing FileTransfer malformed URL tests
> --------------------------------------------
>
> Key: CB-942
> URL: https://issues.apache.org/jira/browse/CB-942
> Project: Apache Cordova
> Issue Type: Bug
> Components: iOS
> Affects Versions: 1.9.0
> Reporter: Becky Gibson
> Assignee: Shazron Abdullah
> Fix For: 1.9.0
>
>
> FileTransfer tests were recently updated to test for malformed URLs in upload and download. iOS is failing those tests as it is returning a bad connection error rather than a bad URL error.
> The URL being tested is: httpssss://ex ample.com (note the space between the x and a in example).
> iOS creates the URL for the file transfer by escaping the url string passed in. Thus, the space gets escaped and the call to create the URL works and a valid URL is created:
> NSURL *url = [NSURL URLWithString:[server stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
> iOS catches the error when it actually tries to communicate with the server and returns the connection error.
> This can be fixed by not escaping the string or NOT escaping the entire string when creating the URL. Also, should httpssss:// fail? The docs indicate the the
> [NSURL urlWithString] api does test against the spec and will return nil if the url created is not valid:
> "Must be a URL that conforms to RFC 2396. This method parses URLString according to RFCs 1738 and 1808. " and "An NSURL object initialized with URLString. If the string was malformed, returns nil."
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira