Skip to content

Commit e8bc7f4

Browse files
phartmannThe Qt Project
authored andcommitted
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.). (cherry picked from commit 795468bdc68931a90454bd1c975f7de7ba670e3b) Change-Id: I8d7b3afb64b9cd25ee7c13b78f0b470d9dae3021 Reviewed-by: Shane Kearns <[email protected]>
1 parent 1d69887 commit e8bc7f4

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/network/access/qhttpmultipart.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -479,6 +479,7 @@ bool QHttpMultiPartIODevice::reset()
479479
for (int a = 0; a < multiPart->parts.count(); a++)
480480
if (!multiPart->parts[a].d->reset())
481481
return false;
482+
readPointer = 0;
482483
return true;
483484
}
484485
qint64 QHttpMultiPartIODevice::readData(char *data, qint64 maxSize)

0 commit comments

Comments
 (0)