This is a small follow-up diff to haesbaert@'s recent commit that enables HTTP Basic authentication in ftp(1):
* In the AUTO-FETCHING FILES section of the ftp(1) man page, describe what [user:password@] does when used with HTTP and HTTPS URLs. * Fix usage formatting to match man page SYNOPSIS exactly. * Fix usage to hide [user:password@] for http/https when compiled with -DSMALL. Thoughts? OK? Index: ftp.1 =================================================================== RCS file: /cvs/src/usr.bin/ftp/ftp.1,v retrieving revision 1.83 diff -u -p -r1.83 ftp.1 --- ftp.1 14 Aug 2012 20:47:08 -0000 1.83 +++ ftp.1 15 Aug 2012 02:07:33 -0000 @@ -1285,12 +1285,32 @@ An HTTP URL, retrieved using the HTTP pr If .Ev http_proxy is defined, it is used as a URL to an HTTP proxy server. +If +.Ar user : Ns Ar password Ns @ +is given and +.Ev http_proxy +isn't defined, authenticate as +.Ar user +with a password of +.Ar password +to retrieve the URL using Basic authentication as defined in +RFC 2617. .It https://[user:password@]host[:port]/file An HTTPS URL, retrieved using the HTTPS protocol. If .Ev http_proxy is defined, this HTTPS proxy server will be used to fetch the file using the CONNECT method. +If +.Ar user : Ns Ar password Ns @ +is given and +.Ev http_proxy +isn't defined, authenticate as +.Ar user +with a password of +.Ar password +to retrieve the URL using Basic authentication as defined in +RFC 2617. .It file:file .Ar file is retrieved from a mounted file system. Index: main.c =================================================================== RCS file: /cvs/src/usr.bin/ftp/main.c,v retrieving revision 1.84 diff -u -p -r1.84 main.c --- main.c 14 Aug 2012 20:47:08 -0000 1.84 +++ main.c 15 Aug 2012 01:51:07 -0000 @@ -778,12 +778,15 @@ usage(void) "[-s srcaddr]\n" " " #endif /* !SMALL */ - "http://[user:password@]host[:port]/file ...\n" + "http://" +#ifndef SMALL + "[user:password@]" +#endif + "host[:port]/file ...\n" #ifndef SMALL " %s [-C] [-c cookie] [-o output] [-s srcaddr]\n" " " - "https://[user:password@]host[:port]/file\n" - " ...\n" + "https://[user:password@]host[:port]/file ...\n" #endif /* !SMALL */ " %s " #ifndef SMALL