Fix URIReader::readSome not returning when more data is wanted than the file contains

This commit is contained in:
Thulinma 2022-11-09 14:59:43 +01:00
parent 38abba66cf
commit 082bca3c30

View file

@ -332,7 +332,7 @@ namespace HTTP{
bufPos = 0;
}
// Read more data if needed
while (allData.size() < wantedLen + bufPos && *this){
while (allData.size() < wantedLen + bufPos && *this && !downer.completed()){
readSome(wantedLen - (allData.size() - bufPos), *this);
}
// Return wantedLen bytes if we have them