Fix truncated files served from internal HTTP server.
BUG: 368
This commit is contained in:
committed by
craig.p.drummond
parent
bc67f706f9
commit
95e78ad24b
@@ -340,6 +340,7 @@ void HttpSocket::readClient()
|
||||
qint32 readBytesTo=0;
|
||||
getRange(params, readBytesFrom, readBytesTo);
|
||||
|
||||
DBUG << "readBytesFrom" << readBytesFrom << "readBytesTo" << readBytesTo;
|
||||
if (q.hasQueryItem("cantata")) {
|
||||
Song song=HttpServer::self()->decodeUrl(url);
|
||||
|
||||
@@ -446,7 +447,7 @@ void HttpSocket::readClient()
|
||||
if (!write(socket, buffer, bytesRead, stop) || f.atEnd()) {
|
||||
break;
|
||||
}
|
||||
} while ((readPos+bytesRead)<totalBytes && !stop && !terminated);
|
||||
} while (readPos<totalBytes && !stop && !terminated);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user