Details
-
Bug
-
Resolution: Incomplete
-
P3: Somewhat important
-
None
-
5.7, 5.8, 5.9, 5.10
-
None
-
Android 5.0
Description
I use QNetworkAccessManager on Android to download file via FTP protocol and when readyRead signal is emitted, QNetworkReply::readData() return empty byte array, and QNetworkReply::bytesAvailable() method returns 0 bytes. Though I know that data is there (via Wireshark) and readyRead() emitted many times.
The same code on Ubuntu 16.04 works fine.
I checked qnetworkreplyimpl.cpp code and saw that in QT 5.6, in readData() method bytes are copied to return buffer, while in 5.7 this code has been removed, and only special case "zero copy buffer" is handled in readData() method. I suspect that on Android this "zero copy buffer" case is not valid.
I do not provide the sample code, as I believe, I spotted the exact place where the issue should be, and FTP GET is covered by QT tests.