Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-1474] Incorrectly adding percent escapes to URL with a custom port number

GitHub Issuen/a
TypeBug
PriorityTrivial
StatusClosed
ResolutionDuplicate
Resolution Date2011-04-15T02:53:50.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsiOS
Labelsios, network, url
ReporterAndre Navarro
AssigneeReggie Seagraves
Created2011-04-15T02:53:49.000+0000
Updated2017-03-09T21:27:42.000+0000

Description

This is on iOS.

say I have a url 'http://localhost:3000/login', it'll get escaped wrongly and fail:

[ERROR] Error loading: , Error: Error Domain=NSURLErrorDomain Code=-1003 "A server with the specified hostname could not be found." UserInfo=0x7c4c830 {NSErrorFailingURLStringKey=https://localhost%3a3000/login, NSErrorFailingURLKey=https://localhost%3a3000/login, NSLocalizedDescription=A server with the specified hostname could not be found., NSUnderlyingError=0x7c4e470 "A server with the specified hostname could not be found."}

I removed the : from the usage of CFURLCreateStringByAddingPercentEscapes in TiUtils.m and NetworkModule.m temporarily for my purposes, though I suppose it does need to be escaped, just not in that part of the URL.

Comments

  1. Lukasz 2011-04-15

    See this https://appcelerator.lighthouseapp.com/projects/32238-titanium-mobile/tickets/1461"> ticket. I think it is already fixed in latest git.

  2. Stephen Tramer 2011-04-15

    Dupe of #1461.

  3. Lee Morris 2017-03-09

    Closing ticket as duplicate.

JSON Source