mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-13 05:20:00 -08:00
[PictureLoader] Fix malformed MIME wildcards in Accept header
The Accept header added in ef87b54b was missing asterisks in two
MIME type wildcards: "image/" and "/*" instead of "image/*" and
"*/*". Servers may reject or mishandle requests with invalid MIME
types, preventing card images from loading.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
dec5e217a2
commit
d904e18b88
1 changed files with 1 additions and 1 deletions
|
|
@ -176,7 +176,7 @@ QNetworkReply *CardPictureLoaderWorker::makeRequest(const QUrl &url, CardPicture
|
||||||
|
|
||||||
QNetworkRequest req(url);
|
QNetworkRequest req(url);
|
||||||
req.setHeader(QNetworkRequest::UserAgentHeader, QString("Cockatrice %1").arg(VERSION_STRING));
|
req.setHeader(QNetworkRequest::UserAgentHeader, QString("Cockatrice %1").arg(VERSION_STRING));
|
||||||
req.setRawHeader("Accept", "image/avif,image/webp,image/apng,image/,/*;q=0.8");
|
req.setRawHeader("Accept", "image/avif,image/webp,image/apng,image/*,*/*;q=0.8");
|
||||||
|
|
||||||
// Cached entries are served straight from the disk cache even when picture downloads are
|
// Cached entries are served straight from the disk cache even when picture downloads are
|
||||||
// enabled: re-fetching an already-cached image would burn the rate limit for nothing. Only a
|
// enabled: re-fetching an already-cached image would burn the rate limit for nothing. Only a
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue