cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Josh Soref <>
Subject RE: Problem on download file named with "@"
Date Mon, 19 Jan 2015 16:19:30 GMT
Michael wrote:
> I send you this email because I have a trouble to download some files.
> Since the last change of the FileTransfer.js, I can't download files
> in their name an <@<  (for example : < myPicture@2015.jpg >).

That sounds like this file:

function getUrlCredentials(urlString) {
    var credentialsPattern = /^http\:\/\/((.*?)\:(.*?))@.*$/g,
        credentials = credentialsPattern.exec(urlString);

    return credentials && credentials[1];

And yes, its regular expression is horribly broken.
has the regexp I recently fixed cordova-blackberry to use because of a
similar complaint.

> I found the source of my problem. It is on the download function which
> the getUrlCredentials function.
> It changes my remote source url. It replaces my url to a new url without
> characters before @.
> For example, if my source is :
> http://myServer/files/images/myPicture@2015/jpg the function try to
> download a file with url : http://2015.jpg.
> I think it's a regression linked to the fixed of the CB-7316 Improves
> specs compatibility.

> PS : I tried to send anle email to but I
received a
> failure notice.

You should either file a bug a bug:
or comment on directly.

View raw message