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:
Attachments
For Gerrit Dashboard: QTBUG-129697 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
596262,5 | DecompressHelper: retain the error from internal counter | dev | qt/qtbase | Status: MERGED | +2 | +1 |
596726,2 | DecompressHelper: retain the error from internal counter | 6.8 | qt/qtbase | Status: MERGED | +2 | 0 |
596773,2 | DecompressHelper: retain the error from internal counter | tqtc/lts-6.5 | qt/tqtc-qtbase | Status: MERGED | +2 | 0 |