Skip to content

Commit 9824d86

Browse files
author
Christophe Dumez
committedApr 7, 2010
Fix HTTPS protocol support in torrent/rss downloader
1 parent 1eac3d1 commit 9824d86

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed
 

‎src/downloadthread.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ enum ProxyType {HTTP=1, SOCKS5=2, HTTP_PW=3, SOCKS5_PW=4, SOCKS4=5};
4242
downloadThread::downloadThread(QObject* parent) : QObject(parent) {
4343
networkManager = new QNetworkAccessManager(this);
4444
connect(networkManager, SIGNAL(finished (QNetworkReply*)), this, SLOT(processDlFinished(QNetworkReply*)));
45+
connect(networkManager, SIGNAL(sslErrors(QNetworkReply*,QList<QSslError>)), this, SLOT(ignoreSslErrors(QNetworkReply*,QList<QSslError>)));
4546
}
4647

4748
downloadThread::~downloadThread(){
@@ -213,3 +214,8 @@ QString downloadThread::errorCodeToString(QNetworkReply::NetworkError status) {
213214
return tr("Unknown error");
214215
}
215216
}
217+
218+
void downloadThread::ignoreSslErrors(QNetworkReply* reply,QList<QSslError> errors) {
219+
// Ignore all SSL errors
220+
reply->ignoreSslErrors(errors);
221+
}

‎src/downloadthread.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
#include <QNetworkReply>
3535
#include <QObject>
3636
#include <QHash>
37+
#include <QSslError>
3738

3839
class QNetworkAccessManager;
3940

@@ -62,6 +63,7 @@ class downloadThread : public QObject {
6263
protected slots:
6364
void processDlFinished(QNetworkReply* reply);
6465
void checkDownloadSize(qint64 bytesReceived, qint64 bytesTotal);
66+
void ignoreSslErrors(QNetworkReply*,QList<QSslError>);
6567

6668
};
6769

3 commit comments

Comments
 (3)

tidle commented on Nov 2, 2024

@tidle

What were they cooking?

cryptid11 commented on Nov 5, 2024

@cryptid11

lol why

dan098 commented on Dec 11, 2024

@dan098

top 3 fumbles

Please sign in to comment.