diff options
author | Lennart Poettering <lennart@poettering.net> | 2021-08-19 18:15:37 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2021-08-20 21:56:39 +0200 |
commit | c456862f87237831ce2bbaeb53a37d1b3d669285 (patch) | |
tree | 763c4d08764dae35c15b6c8f27b89cd1ff63efd4 /src/import/pull-tar.c | |
parent | 55b90ee00b78a449c8f187a5e8141f8ccb100bf4 (diff) | |
download | systemd-c456862f87237831ce2bbaeb53a37d1b3d669285.tar.gz |
import: allow file:// in addition to HTTP(S)
Previously we only allows http/https urls, let's open this up a bit.
Why? Because it makes testing *so* *much* *easier* as we don't need to
run a HTTP server all the time.
CURL mostly abstracts the differences of http/https away from us, hence
we can get away with very little extra work.
Diffstat (limited to 'src/import/pull-tar.c')
-rw-r--r-- | src/import/pull-tar.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/import/pull-tar.c b/src/import/pull-tar.c index 6aca3c9979..06d336bca9 100644 --- a/src/import/pull-tar.c +++ b/src/import/pull-tar.c @@ -597,7 +597,7 @@ int tar_pull_start( assert(!(flags & PULL_SETTINGS) || !(flags & PULL_DIRECT)); assert(!(flags & PULL_SETTINGS) || !checksum); - if (!http_url_is_valid(url)) + if (!http_url_is_valid(url) && !file_url_is_valid(url)) return -EINVAL; if (local && !pull_validate_local(local, flags)) |