Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
5.11.1, 5.11.2, 5.11, 5.12.0
-
None
-
-
20b7e18146e28e73cba52a63a3415c6828f1f6f5 (qt/qtbase/5.12)
Description
QNetworkRequest::Http2DirectAttribute usage cause crash
Code snipped:
QCoreApplication app(argc, argv); QNetworkRequest request; QUrl url; url.setAuthority("localhost:50051", QUrl::StrictMode); url.setScheme("http"); url.setPath("/Greeter/SayHello"); request.setUrl(url); request.setRawHeader("content-type", "application/grpc"); request.setRawHeader("grpc-accept-encoding", "identity,deflate,gzip"); request.setRawHeader("accept-encoding", "identity,gzip"); request.setAttribute(QNetworkRequest::Http2DirectAttribute, true); QNetworkAccessManager nm; QNetworkReply *reply = nm.post(request, QByteArray("")); QObject::connect(reply, &QNetworkReply::finished, [reply](){ qDebug() << "reply" << reply->readAll() << reply->errorString(); }); return app.exec();
Test server attached.