mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-18 06:28:03 -06:00
[WebUI] bugfix: RequestParser::splitMultipartData drop extra trailing newline.
This commit is contained in:
@@ -198,14 +198,14 @@ QList<QByteArray> RequestParser::splitMultipartData(const QByteArray& data, cons
|
|||||||
start = end + sepLength; // skip first boundary
|
start = end + sepLength; // skip first boundary
|
||||||
|
|
||||||
while ((end = data.indexOf(sep, start)) >= 0) {
|
while ((end = data.indexOf(sep, start)) >= 0) {
|
||||||
ret << data.mid(start, end - start);
|
ret << data.mid(start, end - EOL.length() - start);
|
||||||
start = end + sepLength;
|
start = end + sepLength;
|
||||||
}
|
}
|
||||||
|
|
||||||
// last or single part
|
// last or single part
|
||||||
sep = boundary + "--" + EOL;
|
sep = boundary + "--" + EOL;
|
||||||
if ((end = data.indexOf(sep, start)) >= 0)
|
if ((end = data.indexOf(sep, start)) >= 0)
|
||||||
ret << data.mid(start, end - start);
|
ret << data.mid(start, end - EOL.length() - start);
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
|||||||
Reference in New Issue
Block a user