Fix domain server label not handling spaces correctly

This commit is contained in:
Ryan Huffman 2017-11-08 13:09:42 -08:00
parent 393b55424f
commit 3a9c364837

View file

@ -65,7 +65,9 @@ QHash<QString, QString> HTTPConnection::parseUrlEncodedForm() {
QUrlQuery form { _requestContent };
QHash<QString, QString> pairs;
for (auto pair : form.queryItems()) {
pairs[QUrl::fromPercentEncoding(pair.first.toLatin1())] = QUrl::fromPercentEncoding(pair.second.toLatin1());
auto key = QUrl::fromPercentEncoding(pair.first.toLatin1().replace('+', ' '));
auto value = QUrl::fromPercentEncoding(pair.second.toLatin1().replace('+', ' '));
pairs[key] = value;
}
return pairs;