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:
parent
7959b0b17a
commit
e977781087
3 changed files with 17 additions and 13 deletions
|
@ -525,14 +525,17 @@ DWORD CALLBACK UpdateThread(LPVOID v) {
|
||||||
static char pbuf[8192];
|
static char pbuf[8192];
|
||||||
char *p=NULL;
|
char *p=NULL;
|
||||||
*response = 0;
|
*response = 0;
|
||||||
if (getProxyInfo(pbuf)) {
|
if (getProxyInfo(pbuf))
|
||||||
p=my_strstr(pbuf,"http=");
|
{
|
||||||
if (!p) p=pbuf;
|
p=my_strstr(pbuf,"http=");
|
||||||
else {
|
if (!p) p=pbuf;
|
||||||
p+=5;
|
else {
|
||||||
char *tp=my_strstr(p,";");
|
p+=5;
|
||||||
if (tp) *tp=0;
|
}
|
||||||
}
|
char *tp=my_strstr(p,";");
|
||||||
|
if (tp) *tp=0;
|
||||||
|
char *p2=my_strstr(p,"=");
|
||||||
|
if (p2) p=0; // we found the wrong proxy
|
||||||
}
|
}
|
||||||
if (!g_dns) {
|
if (!g_dns) {
|
||||||
g_dns = new JNL_AsyncDNS();
|
g_dns = new JNL_AsyncDNS();
|
||||||
|
|
|
@ -146,14 +146,15 @@ void downloadFile(char *url,
|
||||||
char *p=NULL;
|
char *p=NULL;
|
||||||
if (getProxyInfo(buf))
|
if (getProxyInfo(buf))
|
||||||
{
|
{
|
||||||
p=_strstr(buf,"http=");
|
p=strstr(buf,"http=");
|
||||||
if (!p) p=buf;
|
if (!p) p=buf;
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
p+=5;
|
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();
|
DWORD start_time=GetTickCount();
|
||||||
JNL_HTTPGet *get=new JNL_HTTPGet(JNL_CONNECTION_AUTODNS,16384,(p&&p[0])?p:NULL);
|
JNL_HTTPGet *get=new JNL_HTTPGet(JNL_CONNECTION_AUTODNS,16384,(p&&p[0])?p:NULL);
|
||||||
|
|
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue