1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-01-22 20:44:15 +00:00

- Improved download from url

This commit is contained in:
Christophe Dumez 2006-12-05 02:38:02 +00:00
parent 92277992d3
commit 7e65917215

View File

@ -89,8 +89,8 @@ class downloadThread : public QThread {
return; return;
} }
// Set url to download // Set url to download
curl_easy_setopt(curl, CURLOPT_URL, (const char*)url.toUtf8()); curl_easy_setopt(curl, CURLOPT_URL, url.toLocal8Bit().constData());
qDebug("Url: %s", (const char*)url.toUtf8()); qDebug("Url: %s", url.toLocal8Bit().constData());
// Define our callback to get called when there's data to be written // Define our callback to get called when there's data to be written
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, misc::my_fwrite); curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, misc::my_fwrite);
// Set destination file // Set destination file
@ -102,6 +102,7 @@ class downloadThread : public QThread {
curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 1); curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 1);
// Any kind of authentication // Any kind of authentication
curl_easy_setopt(curl, CURLOPT_HTTPAUTH, CURLAUTH_ANY); curl_easy_setopt(curl, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
//curl_easy_setopt(curl, CURLOPT_VERBOSE, 1);
// Auto referrer // Auto referrer
curl_easy_setopt(curl, CURLOPT_AUTOREFERER, 1); curl_easy_setopt(curl, CURLOPT_AUTOREFERER, 1);
// Follow redirections // Follow redirections