Browse Source

[WebUI] bugfix: `RequestParser::splitMultipartData` drop extra trailing newline.

adaptive-webui-19844
opengg 8 years ago
parent
commit
db3158c410
  1. 4
      src/base/http/requestparser.cpp

4
src/base/http/requestparser.cpp

@ -198,14 +198,14 @@ QList<QByteArray> RequestParser::splitMultipartData(const QByteArray& data, cons @@ -198,14 +198,14 @@ QList<QByteArray> RequestParser::splitMultipartData(const QByteArray& data, cons
start = end + sepLength; // skip first boundary
while ((end = data.indexOf(sep, start)) >= 0) {
ret << data.mid(start, end - start);
ret << data.mid(start, end - EOL.length() - start);
start = end + sepLength;
}
// last or single part
sep = boundary + "--" + EOL;
if ((end = data.indexOf(sep, start)) >= 0)
ret << data.mid(start, end - start);
ret << data.mid(start, end - EOL.length() - start);
}
return ret;

Loading…
Cancel
Save