diff options
author | Andy Shaw <andy.shaw@qt.io> | 2020-12-03 12:31:11 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2020-12-04 16:28:24 +0000 |
commit | 6af20a8eb621c03d06e18049a1e6559831d73c17 (patch) | |
tree | 7f05ba48dbce595c7a2d7bb4ccc12a212e94ae63 /src/network | |
parent | f8842c07475163a5703c92e9b0c4838b1fc5d7cb (diff) |
macOS: Make sure that the reserved characters are not escaped
The URL for the PAC proxy that is passed needs to be preserved for the
main URL part and not entirely percent encoded, only the query part
typically needs to be encoded. So use toEncoded instead for a URL to
ensure they are not percent encoded. This amends
c163ec1dbf873781b77ea67d4449d643c166c0c4
Change-Id: Ie41ab55f71be8e25c18775e61ce7b4d110c2ddbf
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 94c3c7a491e0c25cf2179efe04c2fbd80b370c1c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src/network')
-rw-r--r-- | src/network/kernel/qnetworkproxy_mac.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/network/kernel/qnetworkproxy_mac.cpp b/src/network/kernel/qnetworkproxy_mac.cpp index 3f3b37f666..97f43420ca 100644 --- a/src/network/kernel/qnetworkproxy_mac.cpp +++ b/src/network/kernel/qnetworkproxy_mac.cpp @@ -208,7 +208,7 @@ QCFType<CFStringRef> stringByAddingPercentEscapes(CFStringRef originalPath) { Q_ASSERT(originalPath); const auto qtPath = QString::fromCFString(originalPath); - const auto escaped = QString::fromUtf8(QUrl::toPercentEncoding(qtPath)); + const auto escaped = QString::fromUtf8(QUrl(qtPath).toEncoded()); return escaped.toCFString(); } |