From: huangxuewei Subject: [PATCH 2/3] this patch fix the bug can not find proxy if ip address is split by symbol '; ' Message-Id: <1467708014-32161-1-git-send-email-huangxuewei@linuxdeepin.com> Date: Tue, 5 Jul 2016 16:40:14 +0800 Signed-off-by: huangxuewei --- dlls/wininet/internet.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/dlls/wininet/internet.c b/dlls/wininet/internet.c index 7ac89a6..f52481d 100644 --- a/dlls/wininet/internet.c +++ b/dlls/wininet/internet.c @@ -420,7 +420,9 @@ WCHAR *INTERNET_FindProxyForProtocol(LPCWSTR szProxy, LPCWSTR proto) LPCWSTR end, equal; if (!(end = strchrW(ptr, ' '))) - end = ptr + strlenW(ptr); + if (!(end = strchrW(ptr, ';'))) + end = ptr + strlenW(ptr); + if ((equal = strchrW(ptr, '=')) && equal < end && equal - ptr == strlenW(proto) && !strncmpiW(proto, ptr, strlenW(proto))) @@ -429,7 +431,7 @@ WCHAR *INTERNET_FindProxyForProtocol(LPCWSTR szProxy, LPCWSTR proto) TRACE("found proxy for %s: %s\n", debugstr_w(proto), debugstr_w(ret)); return ret; } - if (*end == ' ') + if (*end == ' ' || *end == ';') ptr = end + 1; else ptr = end; @@ -441,14 +443,16 @@ WCHAR *INTERNET_FindProxyForProtocol(LPCWSTR szProxy, LPCWSTR proto) LPCWSTR end; if (!(end = strchrW(ptr, ' '))) - end = ptr + strlenW(ptr); + if (!(end = strchrW(ptr, ';'))) + end = ptr + strlenW(ptr); + if (!strchrW(ptr, '=')) { ret = heap_strndupW(ptr, end - ptr); TRACE("found proxy for %s: %s\n", debugstr_w(proto), debugstr_w(ret)); return ret; } - if (*end == ' ') + if (*end == ' ' || *end == ';') ptr = end + 1; else ptr = end; -- 2.8.0.rc3