]> sjero.net Git - wget/commitdiff
[svn] Don't rewrite "https://host" to "ftp://https//host" when SSL is not used.
authorhniksic <devnull@localhost>
Thu, 12 May 2005 11:45:05 +0000 (04:45 -0700)
committerhniksic <devnull@localhost>
Thu, 12 May 2005 11:45:05 +0000 (04:45 -0700)
src/ChangeLog
src/url.c

index 8849ee8a1547f29e3b1109f24165fa6b3d848b53..73f91bbe20d28cfb4b2cae43601ebef0afedbd81 100644 (file)
@@ -1,3 +1,8 @@
+2005-05-12  Hrvoje Niksic  <hniksic@xemacs.org>
+
+       * url.c (rewrite_shorthand_url): Don't rewrite "https://host" to
+       "ftp://https//host" when SSL is not used.
+
 2005-05-11  Hrvoje Niksic  <hniksic@xemacs.org>
 
        * openssl.c (ssl_check_server_identity): Renamed to
 2005-05-11  Hrvoje Niksic  <hniksic@xemacs.org>
 
        * openssl.c (ssl_check_server_identity): Renamed to
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 (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;
   if (*p == ':')
     {
       const char *pp;