fix regex parsing of content-disposition header

This commit is contained in:
Martin Rotter 2021-10-15 11:18:39 +02:00
parent 4854a67195
commit 7c599bdef4

View File

@ -141,7 +141,7 @@ QString DownloadItem::saveFileName(const QString& directory) const {
if (m_reply->hasRawHeader("Content-Disposition")) {
QString value = QLatin1String(m_reply->rawHeader("Content-Disposition"));
QRegularExpression exp(QSL(".*filename=?\"([^\"]+)\"?"));
QRegularExpression exp(QSL(".*filename\\s*=\\s*\"?([^\"]+)\"?"));
QRegularExpressionMatch match = exp.match(value);
if (match.isValid()) {