]> sjero.net Git - wget/blobdiff - src/url.c
[svn] Don't rewrite "https://host" to "ftp://https//host" when SSL is not used.
[wget] / src / url.c
index aa3b59788954d4199875e518614a905cb38c6748..d5bdcdc36d0352dc6541556434b2adfb8f33971a 100644 (file)
--- a/src/url.c
+++ b/src/url.c
@@ -534,6 +534,12 @@ rewrite_shorthand_url (const char *url)
   if (p == url)
     return NULL;
 
+  /* If we're looking at "://", it means the URL uses a scheme we
+     don't support, which may include "https" when compiled without
+     SSL support.  Don't bogusly rewrite such URLs.  */
+  if (p[0] == ':' && p[1] == '/' && p[2] == '/')
+    return NULL;
+
   if (*p == ':')
     {
       const char *pp;