Skip to content
Prev 50899 / 63421 Next

Issues with libcurl + HTTP status codes (eg. 403, 404)

In fact, this does reproduce on R-devel:

    > options(download.file.method = "libcurl")
    > options(repos = c(CRAN = "https://cran.rstudio.com/", CRANextra =
    + "http://www.stats.ox.ac.uk/pub/RWin"))
    > install.packages("lattice") ## could be any package
    Installing package into ?/Users/kevinushey/Library/R/3.3/library?
(as ?lib? is unspecified)
    Error: Line starting '<!DOCTYPE HTML PUBLI ...' is malformed!

    > sessionInfo()
    R Under development (unstable) (2015-08-14 r69078)
    Platform: x86_64-apple-darwin13.4.0 (64-bit)
    Running under: OS X 10.10.4 (Yosemite)

I think this could be problematic for users with custom CRAN
repositories. For example, if I have a CRAN repository that only
serves source packages (no binary packages), this implies that any R
session configured to download binary packages would fail to download
any packages at all (as it would barf on attempting to read the
non-existent PACKAGES file for the 'binary' branch of the custom
repository).

This can also be seen by attempting to install a package using current
R-devel (since no binaries are made available for R 3.3):

    > options(download.file.method = "libcurl")
    > options(repos = c(CRAN = "https://cran.rstudio.com/"))
    > print(getOption("pkgType"))
    [1] "both"
    > install.packages("lattice")
    Installing package into ?/Users/kevinushey/Library/R/3.3/library?
    (as ?lib? is unspecified)
    Error in install.packages : Line starting '<!DOCTYPE HTML PUBLI
...' is malformed!

The same error (with a different, XML response) is returned when using
e.g. `https://cran.fhcrc.org`.

Kevin
On Tue, Aug 25, 2015 at 1:33 PM, Martin Morgan <mtmorgan at fredhutch.org> wrote: