From: Hannah von Reth Date: Tue, 1 Dec 2020 15:58:19 +0000 (+0100) Subject: Owncloud - virtual files smaller <1KB - problems with syncing X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~12^2~21^2~468^2~10 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=1b4ccea083e19671b105b64fda0d0b2e45a9527b;p=nextcloud-desktop.git Owncloud - virtual files smaller <1KB - problems with syncing The issue was caused by gziped responses not providing a content lenght header. Fixes: #8248 --- diff --git a/src/libsync/propagatedownload.cpp b/src/libsync/propagatedownload.cpp index 679c5620a..ee44354e2 100644 --- a/src/libsync/propagatedownload.cpp +++ b/src/libsync/propagatedownload.cpp @@ -205,8 +205,9 @@ void GETFileJob::slotMetaDataChanged() return; } - _contentLength = reply()->header(QNetworkRequest::ContentLengthHeader).toLongLong(); - if (_expectedContentLength != -1 && _contentLength != _expectedContentLength) { + bool ok; + _contentLength = reply()->header(QNetworkRequest::ContentLengthHeader).toLongLong(&ok); + if (ok && _expectedContentLength != -1 && _contentLength != _expectedContentLength) { qCWarning(lcGetJob) << "We received a different content length than expected!" << _expectedContentLength << "vs" << _contentLength; _errorString = tr("We received an unexpected download Content-Length.");