Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.9.0
-
None
-
53357f01561d7c2b50e0a656ca250f5e3c1af923
Description
When setting the QNetworkRequest::HTTP2AllowedAttribute attribute and connecting to an "http://" url (not https://), the connection fails without recovery.
Example:
#include <QtNetwork/QtNetwork> int main(int argv, char **argc) { QCoreApplication app(argv, argc); QNetworkAccessManager qnam; QObject::connect(&qnam, &QNetworkAccessManager::finished, [&app](QNetworkReply* rep) { qDebug() << "RESULT:" << rep->error(); app.quit(); }); QNetworkRequest req(QUrl("http://woboq.com")); // any http url would do req.setAttribute(QNetworkRequest::HTTP2AllowedAttribute, true); qnam.get(req); return app.exec(); } /* prints: qt.network.http2: connection error: invalid frame size qt.network.http2: stream 1 finished with error: "invalid frame size" RESULT: QNetworkReply::NetworkError(ProtocolFailure) */