fix regex parsing of content-disposition header
This commit is contained in:
parent
4854a67195
commit
7c599bdef4
1 changed files with 1 additions and 1 deletions
|
@ -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()) {
|
||||
|
|
Loading…
Add table
Reference in a new issue