From 8947bb9be3cd5695f4bf6f82ba2581f83cf4a718 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fr=C3=A9d=C3=A9ric=20Marchal?= Date: Fri, 22 Jan 2010 09:36:26 +0000 Subject: [PATCH] Detect if the URL is just a hostname (in that case .com match the default download list) --- download.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/download.c b/download.c index d990418..776f1e7 100644 --- a/download.c +++ b/download.c @@ -261,9 +261,11 @@ int is_download_suffix(const char *url) urllen=strlen(url)-1; if (urllen<=0) return(0); if (url[urllen] == '.') return(0); //reject a single trailing dot + for (i=0 ; i=urllen) return(0); // url is a hostname without any path or file to download for (i=0 ; i<=max_suffix && imax_suffix || i>=urllen) return(0); suffix=url+urllen-i+1; -- 2.47.2