summaryrefslogtreecommitdiffstats
path: root/logic/net/ForgeXzDownload.cpp
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2013-10-02 23:35:45 +0200
committerPetr Mrázek <peterix@gmail.com>2013-10-02 23:35:45 +0200
commiteba9b3d759dbf6e402e91ab897059f1d274aef90 (patch)
treec60b47ce006a590806d69b397a219bb57aa40b3e /logic/net/ForgeXzDownload.cpp
parent48bd3add29e3e4a8e65fc28925141ea4fef2b8b4 (diff)
downloadMultiMC-eba9b3d759dbf6e402e91ab897059f1d274aef90.tar
MultiMC-eba9b3d759dbf6e402e91ab897059f1d274aef90.tar.gz
MultiMC-eba9b3d759dbf6e402e91ab897059f1d274aef90.tar.lz
MultiMC-eba9b3d759dbf6e402e91ab897059f1d274aef90.tar.xz
MultiMC-eba9b3d759dbf6e402e91ab897059f1d274aef90.zip
Add user agent header to most MultiMC download requests.
Diffstat (limited to 'logic/net/ForgeXzDownload.cpp')
-rw-r--r--logic/net/ForgeXzDownload.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/logic/net/ForgeXzDownload.cpp b/logic/net/ForgeXzDownload.cpp
index dde36f4e..6d66abce 100644
--- a/logic/net/ForgeXzDownload.cpp
+++ b/logic/net/ForgeXzDownload.cpp
@@ -35,6 +35,7 @@ void ForgeXzDownload::start()
qDebug() << "Downloading " << m_url.toString();
QNetworkRequest request(m_url);
request.setRawHeader(QString("If-None-Match").toLatin1(), m_entry->etag.toLatin1());
+ request.setHeader(QNetworkRequest::UserAgentHeader,"MultiMC/5.0 (Cached)");
auto worker = MMC->qnam();
QNetworkReply *rep = worker->get(request);