Ignore:
Timestamp:
Dec 10, 2009, 9:13:08 AM (13 years ago)
Author:
charles
Message:

(trunk libT) fix errors in tr_httpParseURL()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/utils.c

    r9696 r9705  
    985985        protocol = tmp;
    986986        pch += 3;
    987 /*fprintf( stderr, "protocol is [%s]... what's left is [%s]\n", protocol, pch
    988   );*/
     987/*fprintf( stderr, "protocol is [%s]... what's left is [%s]\n", protocol, pch);*/
    989988        if( ( n = strcspn( pch, ":/" ) ) )
    990989        {
     
    10181017    {
    10191018        if( setme_host ){ ( (char*)host )[-3] = ':'; *setme_host =
    1020                               tr_strdup( protocol ); }
    1021         if( setme_path ){ ( (char*)path )[-1] = '/'; *setme_path =
    1022                               tr_strdup( path - 1 ); }
     1019                              tr_strdup( host ); }
     1020        if( setme_path ){ if( path[0] == '/' ) *setme_path = tr_strdup( path );
     1021                          else { ( (char*)path )[-1] = '/'; *setme_path = tr_strdup( path - 1 ); } }
    10231022        if( setme_port ) *setme_port = port;
    10241023    }
Note: See TracChangeset for help on using the changeset viewer.