-
Notifications
You must be signed in to change notification settings - Fork 152
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
Send auth information in the headers #391
Conversation
Instead of sending it in query parameters. This way it is not printed in the logs on errors. Also refactored the download code a bit. We still respect the user's `download.file.method` option. We have tests now for the various download methods. Closes #364.
We need to unset the `download.file.method` while running the tests, in case the user running the tests has a default set.
@jimhester do not merge yet pls, tests on Windows are failing.... |
OK, there is a slight problem. We cannot send headers with the wininet method on R versions older than R 3.6.0. Apparently the user agent trick does not work there. |
Since 3.2.x the Windows builds have libcurl, so this is not a major issue. I will add a warning if the user selected "wininet" on an older version of R and headers are needed. |
Need to double quote, single quote is not special on Windows.
Actually, we always require the curl package if R is older than 3.2.0, so this hardly ever comes up. Still, I'll add a warning for this rare case. |
Older R versions cannot send headers with the wininet method.
OK, I think this is ready. The download code is pretty clean now. |
Cool, looks good, thanks for working on this! |
[ci skip]
Instead of sending it in query parameters.
This way it is not printed in the logs on errors.
Also refactored the download code a bit. We still respect
the user's
download.file.method
option.We have tests now for the various download methods.
Closes #364.