HTTP_DealWithProxy: Only add http:// to proxy string when needed.

This commit is contained in:
Uwe Bonnes 2003-12-15 19:47:31 +00:00 committed by Alexandre Julliard
parent 2567881312
commit 599c4522a8

View File

@ -504,7 +504,10 @@ static BOOL HTTP_DealWithProxy( LPWININETAPPINFOA hIC,
UrlComponents.lpszHostName = buf;
UrlComponents.dwHostNameLength = MAXHOSTNAME;
sprintf(proxy, "http://%s/", hIC->lpszProxy);
if (strncasecmp(hIC->lpszProxy,"http://",strlen("http://")))
sprintf(proxy, "http://%s/", hIC->lpszProxy);
else
strcpy(proxy,hIC->lpszProxy);
if( !InternetCrackUrlA(proxy, 0, 0, &UrlComponents) )
return FALSE;
if( UrlComponents.dwHostNameLength == 0 )