On Thu, 15 Nov 2007, Duncan Temple Lang wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hi Chris. > > Indeed, I cannot connect to that URL either. So I did a bit of > digging and experimentation to find out whether one needed to > pass additional hidden options from the form or whether the problem was > more to do with how we connect. > > It turns out that the script associated with NCBI leuks.cgi is being > fussy and wants you tell it the user agent that is performing the > request. (Why the two behave differently is not clear after a very > brief look, but it is probably not worth pursuing.) > > AFAIR, there is no way to tell R to include a UserAgent field in the > header of the request using url(), etc. although it did come up at one > point.
Which is presumably why download.file works: it does set a user agent (see option HTTPUserAgent). I don't understand why it was added to download.file but not url: but that is easy to rectify. (I don't understand why the server is set up to give an internal server error for a missing field, though). -- Brian D. Ripley, [EMAIL PROTECTED] 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 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595 ______________________________________________ R-help@r-project.org 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.