diff options
author | Viktor Engelmann <viktor.engelmann@qt.io> | 2017-02-27 15:19:51 +0100 |
---|---|---|
committer | Viktor Engelmann <viktor.engelmann@qt.io> | 2017-02-27 15:31:16 +0000 |
commit | 47b498b1d05a5f13e8af8241fb6df9d09a631595 (patch) | |
tree | 0c0d07a24b67a91b0ac6b1213ba0bf6e817a3b6a /src/core | |
parent | 714bddf9921a4e12f03867118c6a4697083e6a14 (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>
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/url_request_context_getter_qt.cpp | 7 |
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() |