-
Notifications
You must be signed in to change notification settings - Fork 265
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
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 |
I don't like the idea of including this since no one seems to understand if and why it's necessary. Users can always add this to their own code if they choose. |
Since this was an undocumented feature of |
It is documented in docs/auth.md |
@DennisHeimbigner I see the following line:
I suppose this is an issue with |
Sorry I have lost track. Can you re-state the Issue to be fixed? |
Fixes #1299