Fix an embarassing if-test-reversal bug that broke scheme guessing.

This commit is contained in:
Dag-Erling Smørgrav 2001-07-08 15:17:26 +00:00
parent 50bc553e3c
commit 74bd3d7698
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=79422

View File

@ -246,9 +246,9 @@ fetch(char *URL, char *path)
if (!*url->scheme) {
if (!*url->host)
strcpy(url->scheme, SCHEME_FILE);
else if (strncasecmp(url->host, "ftp.", 4))
else if (strncasecmp(url->host, "ftp.", 4) == 0)
strcpy(url->scheme, SCHEME_FTP);
else if (strncasecmp(url->host, "www.", 4))
else if (strncasecmp(url->host, "www.", 4) == 0)
strcpy(url->scheme, SCHEME_HTTP);
}