Don't rewrite "https://host" to "ftp://https//host"
Hrvoje Niksic <[email protected]> Thu, 12 May 2005 13:43:58 +0200
| Newsgroups | gmane.comp.web.wget.patches |
|---|---|
| Message-ID | <[email protected]> |
Rewriting of shorthand URLs bogusly rewrites "https://host" to "ftp://https//host" when compiled without SSL support. This patch fixes the problem simply by refusing to rewrite anything that contains "://". 2005-05-12 Hrvoje Niksic <[email protected]> * url.c (rewrite_shorthand_url): Don't rewrite "https://host" to "ftp://https//host" when SSL is not used. Index: src/url.c =================================================================== RCS file: /pack/anoncvs/wget/src/url.c,v retrieving revision 1.127 diff -u -r1.127 url.c --- src/url.c 2005/05/08 16:25:42 1.127 +++ src/url.c 2005/05/12 11:43:17 @@ -534,6 +534,12 @@ 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;