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);
|
multipart->append(part);
|
||||||
}
|
}
|
||||||
for (QString headerVal : valo.keys()) {
|
for (QString headerVal : valo.keys()) {
|
||||||
QString str = valo[headerVal].toString();
|
if (headerVal.startsWith("__")) {
|
||||||
if (str.startsWith("/") && str.endsWith("/"))
|
headerVal = headerVal.mid(2);
|
||||||
str = str.mid(1, str.length() - 1).replace("%contenttype", mime);
|
QString str = valo[headerVal].toString();
|
||||||
part.setRawHeader(headerVal.toLatin1(), str.toLatin1());
|
if (str.startsWith("/") && str.endsWith("/"))
|
||||||
|
str = str.mid(1, str.length() - 1).replace("%contenttype", mime);
|
||||||
|
part.setRawHeader(headerVal.toLatin1(), str.toLatin1());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
switch (method) {
|
switch (method) {
|
||||||
|
Loading…
Reference in New Issue
Block a user