diff options
Diffstat (limited to 'src/network/access/qnetworkaccesshttpbackend.cpp')
-rw-r--r-- | src/network/access/qnetworkaccesshttpbackend.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/network/access/qnetworkaccesshttpbackend.cpp b/src/network/access/qnetworkaccesshttpbackend.cpp index f214699..4874d9d 100644 --- a/src/network/access/qnetworkaccesshttpbackend.cpp +++ b/src/network/access/qnetworkaccesshttpbackend.cpp @@ -605,6 +605,7 @@ void QNetworkAccessHttpBackend::open() QNetworkAccessCache *cache = QNetworkAccessManagerPrivate::getCache(this); if ((http = static_cast<QNetworkAccessHttpBackendCache *>(cache->requestEntryNow(cacheKey))) == 0) { // no entry in cache; create an object + //### thiago: can we try/catch/ignore this???? http = new QNetworkAccessHttpBackendCache(url.host(), url.port(), encrypt); #ifndef QT_NO_NETWORKPROXY @@ -732,10 +733,15 @@ void QNetworkAccessHttpBackend::replyFinished() // store the SSL configuration now // once we call finished(), we won't have access to httpReply anymore QSslConfiguration sslConfig = httpReply->sslConfiguration(); - if (pendingSslConfiguration) + if (pendingSslConfiguration) { *pendingSslConfiguration = sslConfig; - else if (!sslConfig.isNull()) - pendingSslConfiguration = new QSslConfiguration(sslConfig); + } else if (!sslConfig.isNull()) { + QT_TRY { + pendingSslConfiguration = new QSslConfiguration(sslConfig); + } QT_CATCH(...) { + qWarning("QNetworkAccess: could not allocate a QSslConfiguration object for a SSL connection."); + } + } #endif finished(); |