From: hniksic Date: Thu, 12 May 2005 11:45:05 +0000 (-0700) Subject: [svn] Don't rewrite "https://host" to "ftp://https//host" when SSL is not used. X-Git-Tag: v1.13~1044 X-Git-Url: http://sjero.net/git/?p=wget;a=commitdiff_plain;h=47b8598349f7cf406b8357e3b2dd428a12f6be9a [svn] Don't rewrite "https://host" to "ftp://https//host" when SSL is not used. --- diff --git a/src/ChangeLog b/src/ChangeLog index 8849ee8a..73f91bbe 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2005-05-12 Hrvoje Niksic + + * url.c (rewrite_shorthand_url): Don't rewrite "https://host" to + "ftp://https//host" when SSL is not used. + 2005-05-11 Hrvoje Niksic * openssl.c (ssl_check_server_identity): Renamed to diff --git a/src/url.c b/src/url.c index aa3b5978..d5bdcdc3 100644 --- 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;