Fix: Apply http2 patch from owncloud #1573 - only with Qt >= 5.8

Drone builds failed with Qt 5.7 and we introduce a new ifdef here
to avoid patching specifically for Ubuntu Xenial only.

Signed-off-by: Michael Schuster <michael@schuster.ms>
This commit is contained in:
Michael Schuster 2019-11-14 02:39:06 +01:00
parent 9e8498ad4e
commit 5131463644
No known key found for this signature in database
GPG key ID: 00819E3BF4177B28
2 changed files with 5 additions and 1 deletions

View file

@ -160,7 +160,8 @@ void AbstractNetworkJob::slotFinished()
qCWarning(lcNetworkJob) << "SslHandshakeFailedError: " << errorString() << " : can be caused by a webserver wanting SSL client certificates";
}
// Qt doesn't yet transparently resend HTTP2 requests, do so here
#if (QT_VERSION >= 0x050800)
// Qt doesn't yet transparently resend HTTP2 requests, do so here
const auto maxHttp2Resends = 5;
QByteArray verb = requestVerb(*reply());
if (_reply->error() == QNetworkReply::ContentReSendError
@ -190,6 +191,7 @@ void AbstractNetworkJob::slotFinished()
return;
}
}
#endif
if (_reply->error() != QNetworkReply::NoError) {
if (!_ignoreCredentialFailure || _reply->error() != QNetworkReply::AuthenticationRequiredError) {

View file

@ -189,7 +189,9 @@ private:
QString _path;
QTimer _timer;
int _redirectCount = 0;
#if (QT_VERSION >= 0x050800)
int _http2ResendCount = 0;
#endif
// Set by the xyzRequest() functions and needed to be able to redirect
// requests, should it be required.