-
Notifications
You must be signed in to change notification settings - Fork 263
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
Set HTTP.NETRC if .netrc file found #1380
base: master
Are you sure you want to change the base?
Conversation
this looks like a workaround for an issue in the netcdf-c library, correct? (or maybe a change in Ubuntu 22 to now have have CURLOPT_NETRC=CURL_NETRC_IGNORED by default)? |
I think this is a new curl default as |
32e313d
to
ab08bba
Compare
@DennisHeimbigner would appreciate your input on this |
As noted, since using .netrc is off by default, it is necessary to have the HTTP.NETRC=<netrc file path> |
In versions prior to 1.6.1 |
@DennisHeimbigner maybe netcdf-c needs to set CURLOPT_NETRC to CURL_NETRC_OPTIONAL (looks like it is now set to CURL_NETRC_IGNORED by default on most systems)? Maybe if it is set to CURL_NETRC_IGNORED then setting HTTP.NETRC in .ncrc won't do anything. |
@magnusuMET can you provide a reproducible example of the problem that this PR fixes? (including server URL and auth info) |
You are correct that the default is CURLOPT_NETRC_IGNORED. |
@jswhit python3 -m http.server Client code: import netCDF4
url = "http://localhost:8000/"
netCDF4.Dataset(url) Contents of
Run the client code with envionment |
I don't see that "Authorization" message, instead I get
with or without the .netrc file present (using the mods in this PR). |
BTW, running _strencode on the Path object does not return bytes, I had to change that to from |
Fixes #1299