Fossil

Check-in [ac8c21b9]
Login

Check-in [ac8c21b9]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix a bug fix in the URL parser that was introduced by the recent ssh:// change. The bug prevented port numbers after the hostname from parsing correctly.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: ac8c21b986e9b0c86d5747c67e032095b484aecd
User & Date: drh 2010-09-02 10:28:21
References
2010-09-02
23:25 New ticket [21447822] fossil mangles autosync url. ... (artifact: c01d809f user: rwilson)
Context
2010-09-03
01:57
Yet another fix to the URL parser. Ticket [21447822de6be06]. ... (check-in: 7aae4ef0 user: drh tags: trunk)
2010-09-02
10:28
Fix a bug fix in the URL parser that was introduced by the recent ssh:// change. The bug prevented port numbers after the hostname from parsing correctly. ... (check-in: ac8c21b9 user: drh tags: trunk)
2010-08-31
18:21
Minor changes to win/Makefile.msc after testing with MSVC. ... (check-in: 3a5b4ad4 user: shaneh tags: trunk)
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/url.c.

80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
      iStart = 6;
    }else{
      g.urlIsHttps = 0;
      g.urlProtocol = "http";
      g.urlDfltPort = 80;
      iStart = 7;
    }
    for(i=iStart; (c=zUrl[i])!=0 && c!='/' && c!='@'; i++){}
    if( c=='@' ){
      for(j=iStart; j<i && zUrl[j]!=':'; j++){}
      g.urlUser = mprintf("%.*s", j-iStart, &zUrl[iStart]);
      dehttpize(g.urlUser);
      if( j<i ){
        g.urlPasswd = mprintf("%.*s", i-j-1, &zUrl[j+1]);
        dehttpize(g.urlPasswd);







|







80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
      iStart = 6;
    }else{
      g.urlIsHttps = 0;
      g.urlProtocol = "http";
      g.urlDfltPort = 80;
      iStart = 7;
    }
    for(i=iStart; (c=zUrl[i])!=0 && c!='/' && c!='@' && c!=':'; i++){}
    if( c=='@' ){
      for(j=iStart; j<i && zUrl[j]!=':'; j++){}
      g.urlUser = mprintf("%.*s", j-iStart, &zUrl[iStart]);
      dehttpize(g.urlUser);
      if( j<i ){
        g.urlPasswd = mprintf("%.*s", i-j-1, &zUrl[j+1]);
        dehttpize(g.urlPasswd);