diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2000-01-09 05:14:39 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2000-01-09 05:14:39 +0000 |
commit | 7e07161dea4d84682cf51cc2810ddd446e71a4b9 (patch) | |
tree | 59514e61470cd69cee0e5d6e685ac974bf47c8db | |
parent | ebc42814930af81c58a08d49ec49f811ad07f536 (diff) |
Make 'ftp host:/path/to/file' work again. This got broken during IPV6
integration.
-rw-r--r-- | usr.bin/ftp/fetch.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/usr.bin/ftp/fetch.c b/usr.bin/ftp/fetch.c index 3a7afad2118..e5a11bc093d 100644 --- a/usr.bin/ftp/fetch.c +++ b/usr.bin/ftp/fetch.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fetch.c,v 1.26 2000/01/04 17:15:12 deraadt Exp $ */ +/* $OpenBSD: fetch.c,v 1.27 2000/01/09 05:14:38 millert Exp $ */ /* $NetBSD: fetch.c,v 1.14 1997/08/18 10:20:20 lukem Exp $ */ /*- @@ -38,7 +38,7 @@ */ #ifndef lint -static char rcsid[] = "$OpenBSD: fetch.c,v 1.26 2000/01/04 17:15:12 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: fetch.c,v 1.27 2000/01/09 05:14:38 millert Exp $"; #endif /* not lint */ /* @@ -779,9 +779,11 @@ int isurl(p) const char *p; { + if (strncasecmp(p, FTP_URL, sizeof(FTP_URL) - 1) == 0 || strncasecmp(p, HTTP_URL, sizeof(HTTP_URL) - 1) == 0 || - strncasecmp(p, FILE_URL, sizeof(FILE_URL) - 1) == 0) - return 1; - return 0; + strncasecmp(p, FILE_URL, sizeof(FILE_URL) - 1) == 0 || + strstr(p, ":/")) + return (1); + return (0); } |