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

download: add a hook to rewrite URLs #32805

Closed
StefanKarpinski opened this issue Aug 6, 2019 · 3 comments
Closed

download: add a hook to rewrite URLs #32805

StefanKarpinski opened this issue Aug 6, 2019 · 3 comments
Assignees
Milestone

Comments

@StefanKarpinski
Copy link
Sponsor Member

It would often be handy to be able to intercept URLs that are downloaded with Base.download to be able to redirect them elsewhere. Having an official hook mechanism rather than having to monkey patch Base.download would make this easier and less fragile.

@StefanKarpinski StefanKarpinski added this to the 1.3 milestone Aug 6, 2019
@StefanKarpinski StefanKarpinski self-assigned this Aug 6, 2019
@oxinabox
Copy link
Contributor

oxinabox commented Aug 7, 2019

I feel like advanced functionality, is better served by HTTP.download.
Though idk that that case is handled there yet.
Maybe worth opening an issue for it?

@StefanKarpinski
Copy link
Sponsor Member Author

See #32804. Pkg uses BinaryProvider.download, but we want to merge that into Base.download and in a controlled environment, it's important to be able to redirect attempts to download things from the internet to internal replacement locations. If we move HTTP into stdlib then we could rely on HTTP.download for this, but I don't see why this couldn't be part of Base.download.

@vtjnash
Copy link
Sponsor Member

vtjnash commented Aug 15, 2019

triage seems largely OK with proceeding with this as not a big risk and we were convinced it'll be very useful to a small subset of users

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