Hi,

The following diff could be the resolution for bug #67350
If this should be handled differently, please let me know. I think it makes
sense to add "//" in the string comparison since those urls always exist
with those.
We can add specific messages as well that the scheme has a typo or
something like that, I can do that if it is needed.

--
Thanks,
Shikhin
diff --git a/src/url.c b/src/url.c
index 913db4f1..352919f1 100644
--- a/src/url.c
+++ b/src/url.c
@@ -739,9 +739,9 @@ url_parse (const char *url, int *error, struct iri *iri, 
bool percent_encode)
     {
       if (!url_has_scheme (url))
         error_code = PE_MISSING_SCHEME;
-      else if (!c_strncasecmp (url, "https:", 6))
+      else if (!c_strncasecmp (url, "https://";, 8))
         error_code = PE_UNSUPPORTED_SCHEME_HTTPS;
-      else if (!c_strncasecmp (url, "ftps:", 5))
+      else if (!c_strncasecmp (url, "ftps://", 7))
         error_code = PE_UNSUPPORTED_SCHEME_FTPS;
       else
         error_code = PE_UNSUPPORTED_SCHEME;

Reply via email to