diff --git a/src/libsync/networkjobs.cpp b/src/libsync/networkjobs.cpp index 1cde1a2c15a00..020e163431ac5 100644 --- a/src/libsync/networkjobs.cpp +++ b/src/libsync/networkjobs.cpp @@ -999,8 +999,10 @@ bool JsonApiJob::finished() } // save new ETag value - if(reply()->rawHeaderList().contains("ETag")) - emit etagResponseHeaderReceived(reply()->rawHeader("ETag"), statusCode); + auto etagHeader = reply()->header(QNetworkRequest::ETagHeader); + if (etagHeader.isValid()) { + emit etagResponseHeaderReceived(etagHeader.toByteArray(), statusCode); + } QJsonParseError error{}; auto json = QJsonDocument::fromJson(jsonStr.toUtf8(), &error);