Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Eurostat forces the use of https #123

Closed
paulrougieux opened this issue Aug 27, 2018 · 5 comments
Closed

Eurostat forces the use of https #123

paulrougieux opened this issue Aug 27, 2018 · 5 comments

Comments

@paulrougieux
Copy link
Contributor

Eurostat now forces the use of https. This breaks the get_eurostat() function.
Changing the value returned by eurostat_url() to the following: "https://ec.europa.eu/eurostat/" fixes the issue. I suggested a change in a pull request.

@paulrougieux paulrougieux changed the title Eurostat forces the use secure http Eurostat forces the use of https Aug 27, 2018
@paulrougieux
Copy link
Contributor Author

paulrougieux commented Aug 27, 2018

A more flexible alternative would be to make this eurostat_url an option.

An option can be set at package start-up, using the .onLoad() function:

options(eurostat_url = "https://ec.europa.eu/eurostat/")

The option can then be retrieved with:

getOption("eurostat_url")
[1] "https://ec.europa.eu/eurostat/"

Only 3 files would have to be changed:

In those 3 files, the call to eurostat_url() could be replaced with getOption("eurostat_url").

@antagomir
Copy link
Member

I like the latter option ("options"). Could you PR that one?

@jhuovari
Copy link

Great! I think we should update to CRAN soon as possible.

Are there any other use cases for option than the eurostat changing the url? Well, this is the second time in a history of the package, if I remember correctly.

@paulrougieux
Copy link
Contributor Author

paulrougieux commented Aug 28, 2018

Probably no other use case, unless someone decides to make a mirror of the Eurostat data with modified datasets. Could it be a security risk?

Also knitr uses a slightly different mechanism for options. Would that make sense here?

Does the eurostat package need other options? Would it be better to group them under a list?
We could create them and call them with:

eurostat <- list(url = "https://ec.europa.eu/eurostat/")
options(eurostat = eurostat)
getOption("eurostat")$url
[1] "https://ec.europa.eu/eurostat/"

It's more complex and may not be neccessary.

@paulrougieux
Copy link
Contributor Author

Fixed in #124

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants