Commit 09ee8233 authored by Juan Lang's avatar Juan Lang Committed by Alexandre Julliard

winhttp: Check environment if the registry settings are present but bogus.

parent 68fdc5cb
...@@ -851,7 +851,7 @@ BOOL WINAPI WinHttpGetDefaultProxyConfiguration( WINHTTP_PROXY_INFO *info ) ...@@ -851,7 +851,7 @@ BOOL WINAPI WinHttpGetDefaultProxyConfiguration( WINHTTP_PROXY_INFO *info )
{ {
LONG l; LONG l;
HKEY key; HKEY key;
BOOL direct = TRUE; BOOL got_from_reg = FALSE, direct = TRUE;
char *envproxy; char *envproxy;
TRACE("%p\n", info); TRACE("%p\n", info);
...@@ -913,6 +913,7 @@ BOOL WINAPI WinHttpGetDefaultProxyConfiguration( WINHTTP_PROXY_INFO *info ) ...@@ -913,6 +913,7 @@ BOOL WINAPI WinHttpGetDefaultProxyConfiguration( WINHTTP_PROXY_INFO *info )
} }
if (sane) if (sane)
{ {
got_from_reg = TRUE;
direct = FALSE; direct = FALSE;
info->dwAccessType = info->dwAccessType =
WINHTTP_ACCESS_TYPE_NAMED_PROXY; WINHTTP_ACCESS_TYPE_NAMED_PROXY;
...@@ -927,7 +928,7 @@ BOOL WINAPI WinHttpGetDefaultProxyConfiguration( WINHTTP_PROXY_INFO *info ) ...@@ -927,7 +928,7 @@ BOOL WINAPI WinHttpGetDefaultProxyConfiguration( WINHTTP_PROXY_INFO *info )
} }
RegCloseKey( key ); RegCloseKey( key );
} }
else if ((envproxy = getenv( "http_proxy" ))) if (!got_from_reg && (envproxy = getenv( "http_proxy" )))
{ {
char *colon, *http_proxy; char *colon, *http_proxy;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment