diff --git a/libtransmission/web.c b/libtransmission/web.c index 6c797f95b..b86c0f2fe 100644 --- a/libtransmission/web.c +++ b/libtransmission/web.c @@ -212,14 +212,17 @@ addTask( void * vtask ) curl_easy_setopt( easy, CURLOPT_CONNECTTIMEOUT, 60L ); /* set a time limit for announces & scrapes */ - if( strstr( task->url, "announce" ) ) - curl_easy_setopt( easy, CURLOPT_TIMEOUT, 120L ); - else if( strstr( task->url, "scrape" ) ) + if( strstr( task->url, "scrape" ) ) + curl_easy_setopt( easy, CURLOPT_TIMEOUT, 15L ); + else if( strstr( task->url, "announce" ) ) curl_easy_setopt( easy, CURLOPT_TIMEOUT, 30L ); + else + curl_easy_setopt( easy, CURLOPT_TIMEOUT, 240L ); curl_easy_setopt( easy, CURLOPT_FOLLOWLOCATION, 1L ); + curl_easy_setopt( easy, CURLOPT_AUTOREFERER, 1L ); curl_easy_setopt( easy, CURLOPT_FORBID_REUSE, 1L ); - curl_easy_setopt( easy, CURLOPT_MAXREDIRS, 16L ); + curl_easy_setopt( easy, CURLOPT_MAXREDIRS, -1L ); curl_easy_setopt( easy, CURLOPT_NOSIGNAL, 1L ); curl_easy_setopt( easy, CURLOPT_PRIVATE, task ); curl_easy_setopt( easy, CURLOPT_SSL_VERIFYHOST, 0L );