summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorViktor Engelmann <viktor.engelmann@qt.io>2017-02-27 15:19:51 +0100
committerViktor Engelmann <viktor.engelmann@qt.io>2017-02-27 15:31:16 +0000
commit47b498b1d05a5f13e8af8241fb6df9d09a631595 (patch)
tree0c0d07a24b67a91b0ac6b1213ba0bf6e817a3b6a
parent714bddf9921a4e12f03867118c6a4697083e6a14 (diff)
Update HTTP Cache when generating new cookie store
Keeping the same Channel ID Service after changing the cookie store leads to segmentation fault on https connections, because chromium tries to reuse resources that have become invalid. Task-number: QTBUG-58650 Change-Id: I90a32ba8e05567b5ba990d2351c6e22324c89835 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
-rw-r--r--src/core/url_request_context_getter_qt.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/core/url_request_context_getter_qt.cpp b/src/core/url_request_context_getter_qt.cpp
index bf4661102..0cfde1cf4 100644
--- a/src/core/url_request_context_getter_qt.cpp
+++ b/src/core/url_request_context_getter_qt.cpp
@@ -268,6 +268,7 @@ void URLRequestContextGetterQt::updateCookieStore()
if (m_contextInitialized && !m_updateAllStorage && !m_updateCookieStore) {
m_updateCookieStore = true;
+ m_updateHttpCache = true;
content::BrowserThread::PostTask(content::BrowserThread::IO, FROM_HERE,
base::Bind(&URLRequestContextGetterQt::generateCookieStore, this));
}
@@ -337,6 +338,12 @@ void URLRequestContextGetterQt::generateCookieStore()
const std::vector<std::string> cookieableSchemes(kCookieableSchemes, kCookieableSchemes + arraysize(kCookieableSchemes));
cookieMonster->SetCookieableSchemes(cookieableSchemes);
m_cookieDelegate->setCookieMonster(cookieMonster);
+
+ if (!m_updateAllStorage) {
+ Q_ASSERT(m_updateHttpCache);
+ // HttpCache needs to be regenerated when we generate a new channel id service
+ generateHttpCache();
+ }
}
void URLRequestContextGetterQt::updateUserAgent()