-
Notifications
You must be signed in to change notification settings - Fork 180
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
Check for headers correctly in download #391
Conversation
On the way past, I added a thing to break early if the stream In the cases where the filename is part of the URL this doesn't matter as the original blank file is overwritten. But when it has to be found from the header, it means you get an extra incorrectly named empty file left behind |
Can confirm that this solves the problems with Dropbox links. 👍 |
Julia 1.0 tests failing on linux because |
In the meanwhile I added your branch as dependency, https://github.com/mschauer/PointProcessInference.jl/blob/master/Manifest.toml But somehow it still can go wrong, as if DataDeps does use its own dependency For example, when running pkg> add https://github.com/mschauer/PointProcessInference.jl
julia> observations, parameters, λinfo = PointProcessInference.loadexample("coal") I got the old behaviour. |
|
Thank you I was not aware of that. To be of help, I went through the code and found no issues (I also checked that the calls to header do the right thing when the key is not found.) |
Co-Authored-By: oxinabox <oxinabox@ucc.asn.au>
Til this is merged you can always get back on this branch by making sure it is added in your current active envirioment. |
Just keeping this on your screen, as you suggested, oxinabox. |
@quinnj @samoconnor can we merge this? |
There was a problem that @mschauer found with
returning the wrong filename.
It was coming back with
"coal.csv?dl=1"
,but the correct name according to headers is
"coal.csv"
.I took a look in the headers and realized that they were casing all in lowercase.
Which is allowed, but the download function was doing a case sensitive check on the list of headers,
rather than using the
header
function on the response.This PR fixes that.
Could add a test based on the above, but seems a bit fragile.