Merge pull request #64 from waveform80/custom-user-agent

Fix #62 (custom user-agent)
This commit is contained in:
maxnet 2020-05-23 17:54:19 +02:00 committed by GitHub
commit a2c48e0b7d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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)
{