From 2cf309cd0d6fdc17e79de6507fd258c5eeba8187 Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Sat, 5 Oct 2019 00:47:18 +0100 Subject: [PATCH] MythSingleDownload: Set a User-Agent Refs #13488 Signed-off-by: Paul Harrison (cherry picked from commit 017440bde745e8ac97131ed6c01f8a1d17057c51) --- mythtv/libs/libmythbase/mythsingledownload.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mythtv/libs/libmythbase/mythsingledownload.cpp b/mythtv/libs/libmythbase/mythsingledownload.cpp index 855a96829b0..55ddecbd16b 100644 --- a/mythtv/libs/libmythbase/mythsingledownload.cpp +++ b/mythtv/libs/libmythbase/mythsingledownload.cpp @@ -1,5 +1,6 @@ #include "mythsingledownload.h" +#include "mythversion.h" #include "mythlogging.h" /* @@ -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();