robjhyndman / demography

demography package for R
https://pkg.robjhyndman.com/demography
73 stars 25 forks source link

hmd RCurl ignores permanent redirects #26

Closed carlboe closed 7 years ago

carlboe commented 7 years ago

The hmd grabber functions, of which there are several in the R universe, typically do not check for errors returned from the server. Several HMD users report that hmd.mx() and friends broke after HMD did a server upgrade. In the server upgrade, the roles of www.mortality.org and mortality.org were switched. The server tried to tell the programs that the URL should be http://mortality.org instead of http://www.mortality.org.

Since this affected nearly all of the scripts for scraping R code, including one I wrote a long time ago, I changed the server back to the old way as recognizing www.mortality.org as the real server address, with mortality.org as a redirect. This may confuse a few browsers, but will save having code authors having to recode.

--Carl

robjhyndman commented 7 years ago

Fixed in https://github.com/robjhyndman/demography/commit/56f849697ed79d32447db1f59df21c76fa922872