Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
6.7.2
-
None
-
-
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: