commit 7424b358a5f083e20d70e00cc0022f2075703068
parent 1793582dabed4e7f19dbe3ae9c56a1e4e82bc9f0
Author: Kyle Milz <krwmilz@gmail.com>
Date: Mon, 20 Sep 2021 21:33:23 +0000
add a warning when we disregard a scheme != https
Diffstat:
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/util.c b/util.c
@@ -481,8 +481,12 @@ parse_url(const char dest_url[])
sep_url = xstrdup(dest_url);
/* Do not care if this is specified, https is assumed. */
- if ((proto_loc = strstr(dest_url, "://")))
+ if ((proto_loc = strstr(sep_url, "://")) != NULL) {
+ *proto_loc = '\0';
+ if (strcmp(sep_url, "https") != 0)
+ warnx("ignoring scheme '%s'", sep_url);
sep_url = proto_loc + strlen("://");
+ }
url->hostname = sep_url;