diff options
Diffstat (limited to 'src/import/import-raw.c')
-rw-r--r-- | src/import/import-raw.c | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/src/import/import-raw.c b/src/import/import-raw.c index 80fdbb7781..486157aa96 100644 --- a/src/import/import-raw.c +++ b/src/import/import-raw.c @@ -28,9 +28,9 @@ #include "utf8.h" #include "curl-util.h" #include "qcow2-util.h" -#include "import-raw.h" #include "strv.h" #include "copy.h" +#include "import-raw.h" typedef struct RawImportFile RawImportFile; @@ -904,7 +904,7 @@ int raw_import_pull(RawImport *import, const char *url, const char *local, bool int r; assert(import); - assert(raw_url_is_valid(url)); + assert(http_url_is_valid(url)); assert(!local || machine_name_is_valid(local)); if (hashmap_get(import->files, url)) @@ -949,14 +949,3 @@ int raw_import_pull(RawImport *import, const char *url, const char *local, bool f = NULL; return 0; } - -bool raw_url_is_valid(const char *url) { - if (isempty(url)) - return false; - - if (!startswith(url, "http://") && - !startswith(url, "https://")) - return false; - - return ascii_is_valid(url); -} |