summaryrefslogtreecommitdiffstats
path: root/src/network/kernel/qnetworkproxy_mac.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/network/kernel/qnetworkproxy_mac.cpp')
-rw-r--r--src/network/kernel/qnetworkproxy_mac.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/network/kernel/qnetworkproxy_mac.cpp b/src/network/kernel/qnetworkproxy_mac.cpp
index 7d262467c3..81bce0c300 100644
--- a/src/network/kernel/qnetworkproxy_mac.cpp
+++ b/src/network/kernel/qnetworkproxy_mac.cpp
@@ -221,7 +221,11 @@ QList<QNetworkProxy> macQueryInternal(const QNetworkProxyQuery &query)
int enabled;
if (CFNumberGetValue(pacEnabled, kCFNumberIntType, &enabled) && enabled) {
// PAC is enabled
- CFStringRef cfPacLocation = (CFStringRef)CFDictionaryGetValue(dict, kSCPropNetProxiesProxyAutoConfigURLString);
+ // kSCPropNetProxiesProxyAutoConfigURLString returns the URL string
+ // as entered in the system proxy configuration dialog
+ CFStringRef pacLocationSetting = (CFStringRef)CFDictionaryGetValue(dict, kSCPropNetProxiesProxyAutoConfigURLString);
+ QCFType<CFStringRef> cfPacLocation = CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault, pacLocationSetting, NULL, NULL,
+ kCFStringEncodingUTF8);
if (QSysInfo::MacintoshVersion >= QSysInfo::MV_10_5) {
QCFType<CFDataRef> pacData;