mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-27 09:30:13 +03:00
Don't force user agent if one is already set on the request
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
This commit is contained in:
parent
d0ce8bc1ae
commit
50dd715f4d
1 changed files with 4 additions and 1 deletions
|
@ -76,7 +76,10 @@ QNetworkReply *AccessManager::createRequest(QNetworkAccessManager::Operation op,
|
|||
setRawCookie(request.rawHeader("cookie"), request.url());
|
||||
}
|
||||
|
||||
// Respect request specific user agent if any
|
||||
if (!newRequest.hasRawHeader(QByteArrayLiteral("User-Agent"))) {
|
||||
newRequest.setRawHeader(QByteArray("User-Agent"), Utility::userAgentString());
|
||||
}
|
||||
|
||||
// Some firewalls reject requests that have a "User-Agent" but no "Accept" header
|
||||
newRequest.setRawHeader(QByteArray("Accept"), "*/*");
|
||||
|
|
Loading…
Reference in a new issue