[PATCH 2/3] this patch fix the bug can not find proxy if ip address is split by symbol '; '
huangxuewei
huangxuewei at linuxdeepin.com
Tue Jul 5 03:40:14 CDT 2016
Signed-off-by: huangxuewei <huangxuewei at linuxdeepin.com>
---
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
More information about the wine-patches
mailing list