Changeset 13104


Ignore:
Timestamp:
Dec 10, 2011, 6:34:36 PM (10 years ago)
Author:
jordan
Message:

(trunk daemon) #4648 "Transmission-Remote With Full URL Specified Broken" -- fixed with patch from niol

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/daemon/remote.c

    r13033 r13104  
    212212        MY_NAME " [host:port] [options]\n"
    213213                "       "
    214         MY_NAME " [http://host:port/transmission/] [options]\n"
     214        MY_NAME " [http(s?)://host:port/transmission/] [options]\n"
    215215                "\n"
    216216                "See the man page for detailed explanations and many examples.";
     
    23352335}
    23362336
    2337 /* [host:port] or [host] or [port] or [http://host:port/transmission/] */
     2337/* [host:port] or [host] or [port] or [http(s?)://host:port/transmission/] */
    23382338static void
    23392339getHostAndPortAndRpcUrl( int * argc, char ** argv,
     
    23452345        const char * s = argv[1];
    23462346        const char * delim = strchr( s, ':' );
    2347         if( !strncmp(s, "http://", 7 ) )   /* user passed in full rpc url */
    2348         {
    2349             *rpcurl = tr_strdup_printf( "%s/rpc/", s );
     2347        if( !strncmp(s, "http://", 7 ) )   /* user passed in http rpc url */
     2348        {
     2349            *rpcurl = tr_strdup_printf( "%s/rpc/", s + 7 );
     2350        }
     2351        else if( !strncmp(s, "https://", 8) ) /* user passed in https rpc url */
     2352        {
     2353            UseSSL = true;
     2354            *rpcurl = tr_strdup_printf( "%s/rpc/", s + 8 );
    23502355        }
    23512356        else if( delim )   /* user passed in both host and port */
Note: See TracChangeset for help on using the changeset viewer.