mirror of
https://github.com/thoughtbot/capybara-webkit
synced 2023-03-27 23:22:28 -04:00
Ignore SSL errors.
This commit is contained in:
parent
3eb366e011
commit
053010a3a4
2 changed files with 6 additions and 0 deletions
|
@ -27,6 +27,7 @@ void WebPage::setCustomNetworkAccessManager() {
|
|||
manager->setCookieJar(new NetworkCookieJar());
|
||||
this->setNetworkAccessManager(manager);
|
||||
connect(manager, SIGNAL(finished(QNetworkReply *)), this, SLOT(replyFinished(QNetworkReply *)));
|
||||
connect(manager, SIGNAL(sslErrors(QNetworkReply *, QList<QSslError> &)), this, SLOT(ignoreSslErrors(QNetworkReply *, QList<QSslError> &)));
|
||||
}
|
||||
|
||||
void WebPage::loadJavascript() {
|
||||
|
@ -192,6 +193,10 @@ void WebPage::replyFinished(QNetworkReply *reply) {
|
|||
}
|
||||
}
|
||||
|
||||
void WebPage::ignoreSslErrors(QNetworkReply *reply, QList<QSslError> &errors) {
|
||||
reply->ignoreSslErrors(errors);
|
||||
}
|
||||
|
||||
int WebPage::getLastStatus() {
|
||||
return m_lastStatus;
|
||||
}
|
||||
|
|
|
@ -25,6 +25,7 @@ class WebPage : public QWebPage {
|
|||
QString pageHeaders();
|
||||
void frameCreated(QWebFrame *);
|
||||
void replyFinished(QNetworkReply *reply);
|
||||
void ignoreSslErrors(QNetworkReply *reply, QList<QSslError> &);
|
||||
void handleUnsupportedContent(QNetworkReply *reply);
|
||||
|
||||
signals:
|
||||
|
|
Loading…
Reference in a new issue