Hrvoje Niksic
<hniksic@arsdigita To: Wget List <[EMAIL PROTECTED]>,
Thomas Bohn
.com> <[EMAIL PROTECTED]>
Sent by: cc:
[EMAIL PROTECTED] Subject: Re: WGET for OS/2 and
Proxy-Server
sdigita.de
15/05/01 13:00
> Thomas Bohn <[EMAIL PROTECTED]> writes:
>
> > Hello,
> >
> > I tried to use WGET for OS/2 (tested V 1.5.3 and 1.6) with a proxy
> > server. Without proxy server all works fine. But with...
> >
> > In a OS/2 commandline session I type the following commands:
> >
> > SET HTTP_PROXY=62.52.17.1:80
>
> Your proxy setting gets ignored. Try using lower-case `http_proxy'.
>
It seems to me that getenv has some "issues" on OS/2.
Workaround: use .wgetrc commands instead.
All environment variale names (i.e. the part before the '=') are uppercase
on OS/2
wget uses getenv("http_proxy"); the implementation of getenv seems to be
scanning _environ and doing a strncmp (i.e. case-sensitive comparison). If
getproxy in url.c is changed to getenv("HTTP_PROXY") then it does pick up
the environment setting.
Could we postulate that *ALL* environment vars influencing WGET be
uppercase ?
These are the places where getenv is used (excluding getopt.c)
init.c:237: tmp = getenv ("no_proxy");
init.c:259: char *home = getenv ("HOME");
init.c:292: env = getenv ("WGETRC");
url.c:1292: proxy = opt.http_proxy ? opt.http_proxy : getenv ("http_proxy");
url.c:1294: proxy = opt.ftp_proxy ? opt.ftp_proxy : getenv ("ftp_proxy");
url.c:1297: proxy = opt.https_proxy ? opt.https_proxy : getenv ("https_proxy");
--
Csaba Ráduly, Software Engineer Sophos Anti-Virus
email: [EMAIL PROTECTED] http://www.sophos.com
US support: +1 888 SOPHOS 9 UK Support: +44 1235 559933