Browse Source

Merge pull request #4441 from naikel/upload_fix

Multiple Torrents Uploads Fix.  Closes #4428
adaptive-webui-19844
sledgehammer999 9 years ago
parent
commit
ef1261de45
  1. 2
      src/base/http/requestparser.cpp
  2. 3
      src/base/http/types.h

2
src/base/http/requestparser.cpp

@ -319,7 +319,7 @@ bool RequestParser::parseFormData(const QByteArray& data)
ufile.type = disposition["content-type"]; ufile.type = disposition["content-type"];
ufile.data = data.mid(header_end + EOH.length()); ufile.data = data.mid(header_end + EOH.length());
m_request.files[disposition["name"]] = ufile; m_request.files.append(ufile);
} }
else { else {
m_request.posts[disposition["name"]] = QString::fromUtf8(data.mid(header_end + EOH.length())); m_request.posts[disposition["name"]] = QString::fromUtf8(data.mid(header_end + EOH.length()));

3
src/base/http/types.h

@ -32,6 +32,7 @@
#include <QString> #include <QString>
#include <QMap> #include <QMap>
#include <QHostAddress> #include <QHostAddress>
#include <QVector>
typedef QMap<QString, QString> QStringMap; typedef QMap<QString, QString> QStringMap;
@ -70,7 +71,7 @@ namespace Http
QStringMap headers; QStringMap headers;
QStringMap gets; QStringMap gets;
QStringMap posts; QStringMap posts;
QMap<QString, UploadedFile> files; QVector<UploadedFile> files;
}; };
struct ResponseStatus struct ResponseStatus

Loading…
Cancel
Save