Skip to content

Commit

Permalink
MythSingleDownload: Set a User-Agent
Browse files Browse the repository at this point in the history
Refs #13488
Signed-off-by: Paul Harrison <pharrison@mythtv.org>
(cherry picked from commit 017440b)
  • Loading branch information
ijc authored and Paul Harrison committed Oct 5, 2019
1 parent b351dca commit 2cf309c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions mythtv/libs/libmythbase/mythsingledownload.cpp
@@ -1,5 +1,6 @@

#include "mythsingledownload.h"
#include "mythversion.h"
#include "mythlogging.h"

/*
Expand All @@ -20,6 +21,8 @@ bool MythSingleDownload::DownloadURL(const QUrl &url, QByteArray *buffer,

// the HTTP request
QNetworkRequest req(url);
req.setRawHeader("User-Agent",
"MythTV v" MYTH_BINARY_VERSION " MythSingleDownload");
m_replylock.lock();
m_reply = m_mgr.get(req);
m_replylock.unlock();
Expand Down

0 comments on commit 2cf309c

Please sign in to comment.