Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-74765

QNetworkRequest::Http2DirectAttribute is broken

    XMLWordPrintable

Details

    • Linux/X11
    • 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.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            tpochep Timur Pocheptsov
            semlanik Alexey Edelev
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes