1
0
Fork 0
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:
Andrew Wason 2011-09-27 15:31:03 -04:00 committed by Matthew Mongeau
parent 3eb366e011
commit 053010a3a4
2 changed files with 6 additions and 0 deletions

View file

@ -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;
}

View file

@ -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: