From 3bb47b6377b0e15e51fb1c2becf403d6efb42c18 Mon Sep 17 00:00:00 2001 From: Dave Jones Date: Tue, 19 May 2020 19:56:32 +0000 Subject: [PATCH] Fix #62 Append "rpi-imager/version-num" to the default User-Agent when curl is downloading the image so that image hosts can more easily distinguish rpi-imager traffic from other traffic. --- imagewriter.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/imagewriter.cpp b/imagewriter.cpp index 6d1a8d5..ec98571 100644 --- a/imagewriter.cpp +++ b/imagewriter.cpp @@ -180,6 +180,7 @@ void ImageWriter::startWrite() connect(_thread, SIGNAL(success()), SLOT(onSuccess())); connect(_thread, SIGNAL(error(QString)), SLOT(onError(QString))); _thread->setVerifyEnabled(_verifyEnabled); + _thread->setUserAgent(QString("Mozilla/5.0 rpi-imager/%1").arg(constantVersion()).toUtf8()); if (!_expectedHash.isEmpty() && _cachedFileHash != _expectedHash && _cachingEnabled) {