Changeset 11200


Ignore:
Timestamp:
Sep 9, 2010, 6:28:20 PM (11 years ago)
Author:
charles
Message:

(trunk libT) #3077 "add support for cookies files"

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/web.c

    r11172 r11200  
    153153    CURL * e = curl_easy_init( );
    154154    const long verbose = getenv( "TR_CURL_VERBOSE" ) != NULL;
     155    char * cookie_filename = tr_buildPath( s->configDir, "cookies.txt", NULL );         
    155156
    156157    if( !task->range && s->isProxyEnabled ) {
     
    170171
    171172    curl_easy_setopt( e, CURLOPT_AUTOREFERER, 1L );
     173    curl_easy_setopt( e, CURLOPT_COOKIEFILE, cookie_filename );
    172174    curl_easy_setopt( e, CURLOPT_ENCODING, "gzip;q=1.0, deflate, identity" );
    173175    curl_easy_setopt( e, CURLOPT_FOLLOWLOCATION, 1L );
     
    194196        curl_easy_setopt( e, CURLOPT_RANGE, task->range );
    195197
     198    tr_free( cookie_filename );
    196199    return e;
    197200}
Note: See TracChangeset for help on using the changeset viewer.