Fixed a bug with HTTP proxy detection - Joost can finally use NSIS-dl :D

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@1518 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
kichik 2002-11-01 11:22:03 +00:00
parent 7959b0b17a
commit e977781087
3 changed files with 17 additions and 13 deletions

View file

@ -146,14 +146,15 @@ void downloadFile(char *url,
char *p=NULL;
if (getProxyInfo(buf))
{
p=_strstr(buf,"http=");
p=strstr(buf,"http=");
if (!p) p=buf;
else
{
else {
p+=5;
char *tp=_strstr(p,";");
if (tp) *tp=0;
}
char *tp=strstr(p,";");
if (tp) *tp=0;
char *p2=strstr(p,"=");
if (p2) p=0; // we found the wrong proxy
}
DWORD start_time=GetTickCount();
JNL_HTTPGet *get=new JNL_HTTPGet(JNL_CONNECTION_AUTODNS,16384,(p&&p[0])?p:NULL);