QHttpMultipart: reset read pointer when device is reset

... otherwise we would not read from the beginning when trying to
read again. The device is reset when we try to resend a request
(e.g. remote host closed etc.).

Change-Id: I21d3647dd0e00ae8bc2507f08166234f21f88861
Reviewed-by: Markus Goetz <markus@woboq.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
This commit is contained in:
Peter Hartmann 2013-03-20 11:27:08 +01:00 committed by The Qt Project
parent 804a067846
commit 795468bdc6

View File

@ -488,6 +488,7 @@ bool QHttpMultiPartIODevice::reset()
for (int a = 0; a < multiPart->parts.count(); a++)
if (!multiPart->parts[a].d->reset())
return false;
readPointer = 0;
return true;
}
qint64 QHttpMultiPartIODevice::readData(char *data, qint64 maxSize)