Network operations whose content size exceed 2G are not unheard of, and
they probably shouldn't be cached, so use the correct toX() function, one
that doesn't truncate the value in the header.
Change-Id: Ie4e68a3120c85952dd2cc9feb73c5844e20b9aa3
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
foreach (const QNetworkCacheMetaData::RawHeader &header, metaData.rawHeaders()) {
if (header.first.toLower() == "content-length") {
- qint64 size = header.second.toInt();
+ const qint64 size = header.second.toLongLong();
if (size > (maximumCacheSize() * 3)/4)
return 0;
break;