Commit 859f9daa authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

winhttp: Use DNS only for proxy auto-detection.

parent 7c39ce0a
...@@ -1466,7 +1466,7 @@ static WCHAR *detect_autoproxyconfig_url_dns(void) ...@@ -1466,7 +1466,7 @@ static WCHAR *detect_autoproxyconfig_url_dns(void)
while ((p = strchr( p, '.' )) && is_domain_suffix( p + 1, domain )) while ((p = strchr( p, '.' )) && is_domain_suffix( p + 1, domain ))
{ {
char *name; char *name;
struct addrinfo *ai; struct addrinfo *ai, hints;
int res; int res;
if (!(name = malloc( sizeof("wpad") + strlen(p) ))) if (!(name = malloc( sizeof("wpad") + strlen(p) )))
...@@ -1477,7 +1477,10 @@ static WCHAR *detect_autoproxyconfig_url_dns(void) ...@@ -1477,7 +1477,10 @@ static WCHAR *detect_autoproxyconfig_url_dns(void)
} }
strcpy( name, "wpad" ); strcpy( name, "wpad" );
strcat( name, p ); strcat( name, p );
res = getaddrinfo( name, NULL, NULL, &ai ); memset( &hints, 0, sizeof(hints) );
hints.ai_flags = AI_ALL | AI_DNS_ONLY;
hints.ai_family = AF_UNSPEC;
res = getaddrinfo( name, NULL, &hints, &ai );
if (!res) if (!res)
{ {
ret = build_wpad_url( name, ai ); ret = build_wpad_url( name, ai );
......
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