Fix an embarassing if-test-reversal bug that broke scheme guessing.
This commit is contained in:
parent
50bc553e3c
commit
74bd3d7698
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user