incubator-callback-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Becky Gibson (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CB-942) iOS failing FileTransfer malformed URL tests
Date Wed, 20 Jun 2012 20:35:42 GMT
Becky Gibson created CB-942:
-------------------------------

             Summary: 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 URL or NOT escaping the entire string.   Also, should
httpssss:// fail?  The docs indicate the the 
NSURL urlWithString api does test against the spec:  
"Must be a URL that conforms to RFC 2396. This method parses URLString according to RFCs 1738
and 1808. "

--
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

        

Mime
View raw message