incubator-callback-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shazron Abdullah (JIRA)" <>
Subject [jira] [Commented] (CB-942) iOS failing FileTransfer malformed URL tests
Date Wed, 20 Jun 2012 20:52:42 GMT


Shazron Abdullah commented on CB-942:

NSURL reports these as VALID:

# httpssssssss://ex%20ample.
# httpssssssss://

NSURL reports these as  INVALID:
# httpssssssss://ex (note the unescaped space)

The real fix is to only escape the path part of the URL.
> iOS failing FileTransfer malformed URL tests
> --------------------------------------------
>                 Key: CB-942
>                 URL:
>             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
> The URL being tested is:  httpssss://ex (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:!default.jspa
For more information on JIRA, see:


View raw message