1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-01-23 04:54:18 +00:00

Merge pull request #8939 from glassez/requestparser

Properly fill UploadedFile::filename field when parse HTTP request. Closes #8928
This commit is contained in:
Vladimir Golovnev 2018-05-17 06:06:56 +03:00 committed by GitHub
commit b857bb9652
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -291,7 +291,7 @@ bool RequestParser::parseFormData(const QByteArray &data)
const QLatin1String name("name"); const QLatin1String name("name");
if (headersMap.contains(filename)) { if (headersMap.contains(filename)) {
m_request.files.append({filename, headersMap[HEADER_CONTENT_TYPE], payload}); m_request.files.append({headersMap[filename], headersMap[HEADER_CONTENT_TYPE], payload});
} }
else if (headersMap.contains(name)) { else if (headersMap.contains(name)) {
m_request.posts[headersMap[name]] = payload; m_request.posts[headersMap[name]] = payload;