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

QNetworkRequest::Http2DirectAttribute is broken

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P1: Critical
    • Resolution: Done
    • Affects Version/s: 5.11.1, 5.11.2, 5.11, 5.12.0
    • Fix Version/s: 5.12.3, 5.12.4, 5.14.0 Alpha
    • Component/s: Network: HTTP
    • Labels:
      None
    • Platform/s:
      Linux/X11
    • Commits:
      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

        1. HTTP2Direct.patch
          1 kB
        2. testserver.tar.gz
          11 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            • Assignee:
              tpochep Timur Pocheptsov
              Reporter:
              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