RE: [R] Problems with url/download and http_proxy
0
0
Entering edit mode
@warnes-gregory-r-43
Last seen 10.2 years ago
Just adding the trailing slash doesn't seem to help: > Sys.getenv('http_proxy') http_proxy "http://gproxy1.pfizer.com/" > url("http://cran.r-project.org/src/contrib/PACKAGES",'r') connect: Cannot assign requested address unable to connect to 'gproxy1.pfizer.com'. Error in url("http://cran.r-project.org/src/contrib/PACKAGES", "r") : cannot open URL `http://cran.r-project.org/src/contrib/PACKAGES' But adding the port explicitly does: > Sys.getenv("http_proxy") http_proxy "http://gproxy1.pfizer.com:80/" > url("http://cran.r-project.org/src/contrib/PACKAGES",'r') description "http://cran.r-project.org/src/contrib/PACKAGES" class "url" mode "r" text "text" opened "opened" can read "yes" can write "no" even if the trailing slash is not present: > Sys.getenv("http_proxy") http_proxy "http://gproxy1.pfizer.com:80" > url("http://cran.r-project.org/src/contrib/PACKAGES",'r') description "http://cran.r-project.org/src/contrib/PACKAGES" class "url" mode "r" text "text" opened "opened" can read "yes" can write "no" Perhaps the documentation for download.file should be changed to note the requirement of the port. The paragraph on proxies could be changed from Proxies can be specified via environment variables. Setting `"no_proxy"' stops any proxy being tried. Otherwise the setting of `"http_proxy"' or `"ftp_proxy"' (or failing that, the all upper-case version) is consulted and if non-empty used as a proxy site. For FTP transfers, the username and password on the proxy can be specified by `"ftp_proxy_user"' and `"ftp_proxy_password"'. to something like: Proxies can be specified via the environment variables `"http_proxy"' or `"HTTP_PROXY"' and `"ftp_proxy'" or `"FTP_PROXY"'. These variables must be of the form `protocol://machine.domain.tld:port'. For FTP transfers, the username and password on the proxy can be specified by `"ftp_proxy_user"' and `"ftp_proxy_password"'. Setting `"no_proxy"' prevents the use of any proxy. -Greg > -----Original Message----- > From: ripley@stats.ox.ac.uk [mailto:ripley@stats.ox.ac.uk] > Sent: Tuesday, June 18, 2002 11:43 AM > To: Warnes, Gregory R > Cc: 'r-help@stat.math.ethz.ch'; 'bioconductor@stat.math.ethz.ch' > Subject: Re: [R] Problems with url/download and http_proxy > > > The code (which you do have available to you) says http_proxy > > * Should be like http://myproxy/ or http://myproxy:3128/ > > which yours is not, so please try that format. The code suggests > that the traling / can be omitted, but the words do not. > > -- > Brian D. Ripley, ripley@stats.ox.ac.uk > Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ > University of Oxford, Tel: +44 1865 272861 (self) > 1 South Parks Road, +44 1865 272860 (secr) > Oxford OX1 3TG, UK Fax: +44 1865 272595 > > -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-. > -.-.-.-.-.-.-.-.- > r-help mailing list -- Read > http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html > Send "info", "help", or "[un]subscribe" > (in the "body", not the subject !) To: > r-help-request@stat.math.ethz.ch > _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._. > _._._._._._._._._ > LEGAL NOTICE Unless expressly stated otherwise, this message is confidential and may be privileged. It is intended for the addressee(s) only. Access to this E-mail by anyone else is unauthorized. If you are not an addressee, any disclosure or copying of the contents of this E-mail or any action taken (or not taken) in reliance on it is unauthorized and may be unlawful. If you are not an addressee, please inform the sender immediately.
ASSIGN ASSIGN • 1.8k views
ADD COMMENT

Login before adding your answer.

Traffic: 394 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6