Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
5.11.2
-
-
9e61cec7915ca177e88bd685a3229f153ee7ab7a (qt/qtbase/5.12)
Description
Current implementation for 'no-cache' directive of Cache-Control in HTTP response header is incorrect. It should not be same with 'no-store'. There is condition to use cache.
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control#Cacheability
no-cache: {{}}Forces caches to submit the request to the origin server for validation before releasing a cached copy.
Current codes in head are here:
http://code.qt.io/cgit/qt/qtbase.git/tree/src/network/access/qnetworkreplyhttpimpl.cpp#n1741
QNetworkCacheMetaData QNetworkReplyHttpImplPrivate::fetchCacheMetaData(const QNetworkCacheMetaData &oldMetaData) const { ... // HTTP/1.1. Check the Cache-Control header if (cacheControl.contains("no-cache")) canDiskCache = false; else if (cacheControl.contains("no-store")) canDiskCache = false;