Skip to content

Commit

Permalink
Always send a language header in all requests
Browse files Browse the repository at this point in the history
Fixes: #10619
  • Loading branch information
erikjv committed Jul 10, 2023
1 parent b4273b2 commit 26472cd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/libsync/accessmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ QNetworkReply *AccessManager::createRequest(QNetworkAccessManager::Operation op,
// Some firewalls reject requests that have a "User-Agent" but no "Accept" header
newRequest.setRawHeader(QByteArrayLiteral("Accept"), QByteArrayLiteral("*/*"));

// Set the language, so messages from the server are localised correctly.
newRequest.setRawHeader("Accept-Language", QLocale().name().toUtf8());

QByteArray verb = newRequest.attribute(QNetworkRequest::CustomVerbAttribute).toByteArray();
// For PROPFIND (assumed to be a WebDAV op), set xml/utf8 as content type/encoding
// This needs extension
Expand Down

0 comments on commit 26472cd

Please sign in to comment.