Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
4.8.0
-
None
Description
When trying to send a QFile via HTTP using QHttpPart, the upload fails if the QFile has been seek()'d beforehand.
It appears that QHttpPart uses QIODevice::size() to determine how much to read from the file, disregarding the current position of the QFile's read pointer, so if a seek() is executed, it will try to read more bytes than available, getting stuck in a loop.
A minimal example is attached. Run passing any file as the first argument. It will loop forever trying to read some bytes at the end of the file. Commenting f->seek(1); makes it work.
Attachments
Issue Links
- relates to
-
QTBUG-24738 Signal finishedWithError from QHttpNetworkReply not connected to QNetworkAccessHttpBackend.
- Closed