summaryrefslogtreecommitdiffstats
path: root/net/proxy/proxy_resolver_winhttp.cc
diff options
context:
space:
mode:
Diffstat (limited to 'net/proxy/proxy_resolver_winhttp.cc')
-rw-r--r--net/proxy/proxy_resolver_winhttp.cc15
1 files changed, 13 insertions, 2 deletions
diff --git a/net/proxy/proxy_resolver_winhttp.cc b/net/proxy/proxy_resolver_winhttp.cc
index 5a16df5..19dd0b0 100644
--- a/net/proxy/proxy_resolver_winhttp.cc
+++ b/net/proxy/proxy_resolver_winhttp.cc
@@ -8,6 +8,7 @@
#include <winhttp.h>
#include "base/histogram.h"
+#include "base/string_tokenizer.h"
#include "net/base/net_errors.h"
#pragma comment(lib, "winhttp.lib")
@@ -70,8 +71,18 @@ int ProxyResolverWinHttp::GetProxyConfig(ProxyConfig* config) {
config->auto_detect = true;
if (ie_config.lpszProxy)
config->proxy_server = WideToASCII(ie_config.lpszProxy);
- if (ie_config.lpszProxyBypass)
- config->proxy_bypass = WideToASCII(ie_config.lpszProxyBypass);
+ if (ie_config.lpszProxyBypass) {
+ std::string proxy_bypass = WideToASCII(ie_config.lpszProxyBypass);
+
+ StringTokenizer proxy_server_bypass_list(proxy_bypass, "; \t\n\r");
+ while (proxy_server_bypass_list.GetNext()) {
+ std::string bypass_url_domain = proxy_server_bypass_list.token();
+ if (bypass_url_domain == "<local>")
+ config->proxy_bypass_local_names = true;
+ else
+ config->proxy_bypass.push_back(bypass_url_domain);
+ }
+ }
if (ie_config.lpszAutoConfigUrl)
config->pac_url = WideToASCII(ie_config.lpszAutoConfigUrl);