mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-16 02:03:07 -07:00
- downloads from urls now follow redirections
This commit is contained in:
parent
aada4f3c03
commit
2f5b4a190e
1 changed files with 8 additions and 0 deletions
|
@ -112,6 +112,14 @@ void subDownloadThread::run(){
|
||||||
// We have to define CURLOPT_WRITEFUNCTION or it will crash on windows
|
// We have to define CURLOPT_WRITEFUNCTION or it will crash on windows
|
||||||
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, fwrite);
|
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, fwrite);
|
||||||
curl_easy_setopt(curl, CURLOPT_WRITEDATA, f);
|
curl_easy_setopt(curl, CURLOPT_WRITEDATA, f);
|
||||||
|
// Verbose
|
||||||
|
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1);
|
||||||
|
// No progress info (we don't use it)
|
||||||
|
curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 1);
|
||||||
|
// Redirections
|
||||||
|
curl_easy_setopt(curl, CURLOPT_AUTOREFERER, 1);
|
||||||
|
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1);
|
||||||
|
curl_easy_setopt(curl, CURLOPT_MAXREDIRS, -1);
|
||||||
qDebug("Downloading %s", url.toUtf8().data());
|
qDebug("Downloading %s", url.toUtf8().data());
|
||||||
res = curl_easy_perform(curl);
|
res = curl_easy_perform(curl);
|
||||||
/* always cleanup */
|
/* always cleanup */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue