summaryrefslogtreecommitdiffstats
path: root/src/network/access/qhttpnetworkreply.cpp
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2011-07-06 16:05:48 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2011-07-06 16:05:48 (GMT)
commit8bc5a6319455d7dc0655a8c48862ada8890b0064 (patch)
tree2f43d23e5a30e9f2c18698038291c74254db480a /src/network/access/qhttpnetworkreply.cpp
parent013fb92b20db4fc3dc6a7a7d4cd0a3a0c941472f (diff)
parent156893a247f1c24094129b6f5151c8b821d8b1b5 (diff)
downloadQt-8bc5a6319455d7dc0655a8c48862ada8890b0064.zip
Qt-8bc5a6319455d7dc0655a8c48862ada8890b0064.tar.gz
Qt-8bc5a6319455d7dc0655a8c48862ada8890b0064.tar.bz2
Merge branch 4.7 into qt-4.8-from-4.7
Diffstat (limited to 'src/network/access/qhttpnetworkreply.cpp')
-rw-r--r--src/network/access/qhttpnetworkreply.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/network/access/qhttpnetworkreply.cpp b/src/network/access/qhttpnetworkreply.cpp
index 00653b6..1a02200 100644
--- a/src/network/access/qhttpnetworkreply.cpp
+++ b/src/network/access/qhttpnetworkreply.cpp
@@ -461,15 +461,21 @@ int QHttpNetworkReplyPrivate::gunzipBodyPartially(QByteArray &compressed, QByteA
}
have = sizeof(out) - inflateStrm.avail_out;
inflated.append(QByteArray((const char *)out, have));
- } while (inflateStrm.avail_out == 0);
+ } while (inflateStrm.avail_out == 0 && inflateStrm.avail_in > 0);
// clean up and return
if (ret <= Z_ERRNO || ret == Z_STREAM_END) {
- inflateEnd(&inflateStrm);
- initInflate = false;
+ gunzipBodyPartiallyEnd();
}
streamEnd = (ret == Z_STREAM_END);
return ret;
}
+
+void QHttpNetworkReplyPrivate::gunzipBodyPartiallyEnd()
+{
+ inflateEnd(&inflateStrm);
+ initInflate = false;
+}
+
#endif
qint64 QHttpNetworkReplyPrivate::readStatus(QAbstractSocket *socket)