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

QT stopped understanding HTTP response compressed with gzip.

    XMLWordPrintable

Details

    • Windows
    • f84c83be5 (dev), a7ad2641c (6.8), 80f023702 (tqtc/lts-6.5)

    Description

      In my app I have a code like this:

      QNetworkAccessManager m_nm; 
      void func()
      {
          QNetworkRequest request; 
          request.setUrl("https://api.binance.com/api/v3/exchangeInfo"); 
          QNetworkReply* reply = m_nm.get(request); 
          // ...
      }
      
      // in the signal handler:
      const QString answer = reply->readAll();
      // parse the answer  

      Today it stopped working and I got the corrupted response and the following logs in my app:
       

      As you can see, the response contains `content-encoding=gzip` header. 

      the workaround was to add the following line of code:
       

      request.setRawHeader(QByteArray("Accept-Encoding"), QByteArray("deflate, br"));

      that prevents the response from being compressed with gzip.

      After that my app started to work and I did not investigate this anymore and the only thing I can suggest is that Binance changed something on its servers and QT stopped understanding its responses.

      For example, Postman handles the response compressed with gzip:

       

      Attachments

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

        Activity

          People

            manordheim Mårten Nordheim
            dmitriano Dmitry Efimov
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes