Re: [R] http proxies: setting and unsetting

From: Gabor Grothendieck <ggrothendieck_at_gmail.com>
Date: Tue, 29 May 2007 23:20:01 -0400

You can have 4 different http_proxy environment variables and if you set one type but try to unset a different type then that will have no effect on the one you originally set. For example, if you originally set it as a system or user environment variable and then try to unset the process environment variable of the same name then that will have no effect on the system or user environment variable.

On 5/29/07, matt.pettis_at_thomson.com <matt.pettis_at_thomson.com> wrote:
> Hi Gabor,
>
> Thanks for the reply and link.
>
> I took a look at the link -- one thing I don't understand is why if I delete the 'http_proxy' variable via the cmd shell (or equivalent OS dialog box), why I can get R to ignore the proxy, but using Sys.setenv("http_proxy"="") won't do that for me (at least for the scope of the session). If there were other variables affecting it, I would think my deleting 'http_proxy' in the OS would also have no effect -- yet it does.
>
> Any ideas?
>
> Thanks again,
> Matt
>
>
> -----Original Message-----
> From: Gabor Grothendieck [mailto:ggrothendieck_at_gmail.com]
> Sent: Tue 5/29/2007 9:49 PM
> To: Pettis, Matthew (Thomson)
> Cc: r-help_at_stat.math.ethz.ch
> Subject: Re: [R] http proxies: setting and unsetting
>
> Note that Windows XP has 4 types of environment variables and I suspect
> that the problem stems from not taking that into account:
>
> http://www.microsoft.com/technet/scriptcenter/guide/sas_wsh_kmmj.mspx?mfr=true
>
> On 5/29/07, matt.pettis_at_thomson.com <matt.pettis_at_thomson.com> wrote:
> > Hi,
> >
> > I am trying to use R at work and at home on the same computer. At work, I have a proxy, and at home, I do not. I have, for work, a User environment variable "http_proxy" which I set in the OS (Windows XP Pro). When I am at work, and I try to retrieve data from the web with 'read.csv', things work just fine. I assume it knows how to use the proxy.
> >
> > The trouble is when I am at home and have no proxy, R still tries to use my work proxy. I have tried the following:
> >
> > Sys.setenv("http_proxy"="")
> > Sys.setenv("no_proxy"=TRUE)
> > Sys.setenv("no_proxy"=1)
> >
> > none of which seems to work. Whenever I try to use read.csv, it tells me that it cannot find my work proxy, which I am trying to tell R to ignore.
> >
> > I can solve this problem by removing the http_proxy environment variable binding in the OS when at home, but that is a pain, because then I have to reset it when I go back into work.
> >
> > Is there a way to tell R within a session to ignore the proxy? If so, what am I doing wrong?
> >
> > thanks,
> > matt
> >
> > ______________________________________________
> > R-help_at_stat.math.ethz.ch mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> > and provide commented, minimal, self-contained, reproducible code.
> >
>
>



R-help_at_stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Wed 30 May 2007 - 03:27:35 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 30 May 2007 - 06:31:41 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.