qCWarning(lcNetworkJob) << "SslHandshakeFailedError: " << errorString() << " : can be caused by a webserver wanting SSL client certificates";
}
-#if (QT_VERSION >= 0x050800)
// Qt doesn't yet transparently resend HTTP2 requests, do so here
const auto maxHttp2Resends = 3;
QByteArray verb = requestVerb(*reply());
return;
}
}
-#endif
if (_reply->error() != QNetworkReply::NoError) {
// ### some of the qWarnings here should be exported via displayErrors() so they
// ### can be presented to the user if the job executor has a GUI
- QByteArray verb = requestVerb(*reply());
if (requestedUrl.scheme() == QLatin1String("https") && redirectUrl.scheme() == QLatin1String("http")) {
qCWarning(lcNetworkJob) << this << "HTTPS->HTTP downgrade detected!";
} else if (requestedUrl == redirectUrl || _redirectCount + 1 >= maxRedirects()) {
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.
return;
}
- if (_device->isOpen()) {
- qint64 w = _device->write(buffer.constData(), r);
- if (w != r) {
- _errorString = _device->errorString();
- _errorStatus = SyncFileItem::NormalError;
- qCWarning(lcGetJob) << "Error while writing to file" << w << r << _errorString;
- reply()->abort();
- return;
- }
+ qint64 w = _device->write(buffer.constData(), r);
+ if (w != r) {
+ _errorString = _device->errorString();
+ _errorStatus = SyncFileItem::NormalError;
+ qCWarning(lcGetJob) << "Error while writing to file" << w << r << _errorString;
+ reply()->abort();
+ return;
}
}
public:
FakeErrorReply(QNetworkAccessManager::Operation op, const QNetworkRequest &request,
QObject *parent, int httpErrorCode, const QByteArray &body = QByteArray())
- : QNetworkReply{parent}, _httpErrorCode(httpErrorCode), _body(body) {
+ : QNetworkReply{parent}, _body(body) {
setRequest(request);
setUrl(request.url());
setOperation(op);
return _body.size();
}
- int _httpErrorCode;
QByteArray _body;
};