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

http2 crash when I use unicode in http header

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.15.1, 5.15.2, 6.0
    • 5.12.9, 5.15.0, 5.15.1
    • Network: HTTP
    • None
    • windows 10, ubuntu 20.04
    • All
    • 3e210dc19a6f51e34a788bcd492741628224111c a61ab4ca45edb52c3eb46275b9a39ba801d033e6 (qt/qtbase/5.15)

    Description

      When I am using unicode in http header

      and When I use http2

      Application asserted with

       

      6 HPack::BitOStream::writeBits bitstreams.cpp 74 0x7ffff6ff7ca5
      7 HPack::(anonymous namespace)::write_huffman_code huffman.cpp 362 0x7ffff6ff8a01
      8 HPack::huffman_encode_string qarraydata.h 61 0x7ffff6ff8b0f
      9 HPack::BitOStream::write bitstreams.cpp 117 0x7ffff6ff7e14
      10 HPack::Encoder::encodeLiteralField hpack.cpp 403 0x7ffff6ff9e84
      11 HPack::Encoder::encodeHeaderField hpack.cpp 299 0x7ffff6ffa00c
      12 HPack::Encoder::encodeRequest hpack.cpp 163 0x7ffff6ffad21
      13 QHttp2ProtocolHandler::sendHEADERS qhttp2protocolhandler.cpp 492 0x7ffff70045dd
      14 QHttp2ProtocolHandler::sendRequest qhttp2protocolhandler.cpp 398 0x7ffff7009f3f
      15 QHttpNetworkConnectionChannel::sendRequest qhttpnetworkconnectionchannel.cpp 258 0x7ffff701d719
      16 QHttpNetworkConnectionPrivate::_q_startNextRequest qhttpnetworkconnection.cpp 1083 0x7ffff701c65d
      17 QHttpNetworkConnection::qt_static_metacall qhttpnetworkconnection_p.h 167 0x7ffff701cde7
       

      I attached example. It is just modified http example with 

      request.setAttribute( QNetworkRequest::HTTP2AllowedAttribute, true );

      request.setHeader( QNetworkRequest::ContentDispositionHeader, QStringLiteral("ššččč") );

       

      All fine when I disable http2

       

      Attachments

        For Gerrit Dashboard: QTBUG-86418
        # Subject Branch Project Status CR V

        Activity

          People

            tpochep Timur Pocheptsov
            miskol MICHAL LAZO
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes