Oops fix header processing for multipart
This commit is contained in:
parent
99d0654727
commit
c621c0db3e
@ -319,10 +319,13 @@ void CustomUploader::doUpload(QByteArray imgData, QString format) {
|
||||
multipart->append(part);
|
||||
}
|
||||
for (QString headerVal : valo.keys()) {
|
||||
QString str = valo[headerVal].toString();
|
||||
if (str.startsWith("/") && str.endsWith("/"))
|
||||
str = str.mid(1, str.length() - 1).replace("%contenttype", mime);
|
||||
part.setRawHeader(headerVal.toLatin1(), str.toLatin1());
|
||||
if (headerVal.startsWith("__")) {
|
||||
headerVal = headerVal.mid(2);
|
||||
QString str = valo[headerVal].toString();
|
||||
if (str.startsWith("/") && str.endsWith("/"))
|
||||
str = str.mid(1, str.length() - 1).replace("%contenttype", mime);
|
||||
part.setRawHeader(headerVal.toLatin1(), str.toLatin1());
|
||||
}
|
||||
}
|
||||
}
|
||||
switch (method) {
|
||||
|
Loading…
Reference in New Issue
Block a user