MoodbarLoader: Add header name for disk cache

This commit is contained in:
Jonas Kvinge 2024-05-13 00:44:37 +02:00
parent 0a99eca7cd
commit 0983ba1339
1 changed files with 1 additions and 1 deletions

View File

@ -192,7 +192,7 @@ void MoodbarLoader::RequestFinished(MoodbarPipeline *request, const QUrl &url) {
disk_cache_metadata.setSaveToDisk(true);
disk_cache_metadata.setUrl(CacheUrlEntry(filename));
// Qt 6 now ignores any entry without headers, so add a fake header.
disk_cache_metadata.setRawHeaders(QNetworkCacheMetaData::RawHeaderList() << qMakePair(QByteArray(), QByteArray()));
disk_cache_metadata.setRawHeaders(QNetworkCacheMetaData::RawHeaderList() << qMakePair(QByteArray("moodbar"), QByteArray("moodbar")));
QIODevice *device_cache_file = cache_->prepare(disk_cache_metadata);
if (device_cache_file) {