Browse Source

Use reference when parsing URL query

PR #19659.
adaptive-webui-19844
Chocobo1 1 year ago committed by GitHub
parent
commit
47439a7efd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      src/base/http/requestparser.cpp

7
src/base/http/requestparser.cpp

@ -251,12 +251,9 @@ bool RequestParser::parsePostMessage(const QByteArrayView data) @@ -251,12 +251,9 @@ bool RequestParser::parsePostMessage(const QByteArrayView data)
// [URL Standard] 5.1 application/x-www-form-urlencoded parsing
const QByteArray processedData = data.toByteArray().replace('+', ' ');
QListIterator<QStringPair> i(QUrlQuery(QString::fromUtf8(processedData)).queryItems(QUrl::FullyDecoded));
while (i.hasNext())
{
const QStringPair pair = i.next();
const QList<QStringPair> pairs = QUrlQuery(QString::fromUtf8(processedData)).queryItems(QUrl::FullyDecoded);
for (const QStringPair &pair : pairs)
m_request.posts[pair.first] = pair.second;
}
return true;
}

Loading…
Cancel
Save