Details
-
Bug
-
Resolution: Invalid
-
Not Evaluated
-
None
-
4.7.2
-
None
-
QT SDK 4.7.2
Description
we need to receive http response data from server side, and the data is compressed in GZIP format, currently the response data is delivered to client application in compressed format, not decompressed by QNAM automatically. some code example listed as below:
before send the request to http server, the header to ask server use gzip compression was set:
const QString KAcceptEncoding( "gzip" ); aNetworkRequest.setRawHeader("Accept-Encoding", KAcceptEncoding.toAscii()); then response was processed as below: void onFinished(QNetworkReply *aNwkReply) { if(aNwkReply->error() != QNetworkReply::NoError) { LOG_FORMAT("Error received: %s", STRING2CHAR(aNwkReply->errorString())); emit errorNotified(true); return; } mNwkReply = aNwkReply; QByteArray response1 = mNwkReply->readAll(); mNwkReply->deleteLater(); mNwkReply = NULL; //here the data read into variable response1 is still in compressed format. }