Merge pull request #471 from daimor/master

Correctly handle HTTP responses with gzipped encoded content.
This commit is contained in:
Christophe Dumez
2013-03-10 11:08:57 -07:00
5 changed files with 67 additions and 7 deletions

View File

@@ -2675,14 +2675,14 @@ void QBtSession::addMagnetSkipAddDlg(const QString& uri, const QString& save_pat
addMagnetUri(uri, false);
}
void QBtSession::downloadUrlAndSkipDialog(QString url, QString save_path, QString label) {
void QBtSession::downloadUrlAndSkipDialog(QString url, QString save_path, QString label, const QList<QNetworkCookie>& cookies) {
//emit aboutToDownloadFromUrl(url);
const QUrl qurl = QUrl::fromEncoded(url.toUtf8());
if (!save_path.isEmpty() || !label.isEmpty())
savepathLabel_fromurl[qurl] = qMakePair(save_path, label);
url_skippingDlg << qurl;
// Launch downloader thread
downloader->downloadTorrentUrl(url);
downloader->downloadTorrentUrl(url, cookies);
}
// Add to Bittorrent session the downloaded torrent file

View File

@@ -131,7 +131,7 @@ public slots:
void disableIPFilter();
void setQueueingEnabled(bool enable);
void handleDownloadFailure(QString url, QString reason);
void downloadUrlAndSkipDialog(QString url, QString save_path=QString(), QString label=QString());
void downloadUrlAndSkipDialog(QString url, QString save_path=QString(), QString label=QString(), const QList<QNetworkCookie>& cookies = QList<QNetworkCookie>());
// Session configuration - Setters
void setListeningPort(int port);
void setMaxConnections(int maxConnec);