patch HTFTP.c to allow ftp://user:password@host/

Larry Masinter (masinter@parc.xerox.com)
Mon, 6 Dec 1993 14:08:47 PST


nevermind the 'athost', that's part of the patches for allowing
connection through a Sun proxy service

*** libwww2/HTFTP.c Mon Dec 6 14:04:01 1993
--- /import-writable/www/src/Mosaic-2.0/libwww2//HTFTP.c Mon Dec 6 10:15:58 1993
***************
*** 286,292 ****
char *password = 0;
char athost[250];
int hostlen;
!
if (!arg)
return -1; /* Bad if no name sepcified */
if (!*arg)
--- 286,293 ----
char *password = 0;
char athost[250];
int hostlen;
! char dummy[MAXHOSTNAMELEN+8];
!
if (!arg)
return -1; /* Bad if no name sepcified */
if (!*arg)
***************
*** 322,332 ****

if (!username)
free(p1);
}

con = -1;

! status = HTDoConnect (arg, "FTP", IPPORT_FTP, &con);

if (status < 0)
{
--- 323,336 ----

if (!username)
free(p1);
+
+ /* copy hostname into dummy URL, since username:password@ might have been part of original */
+ sprintf(dummy, "ftp://%s", p1);
}

con = -1;

! status = HTDoConnect (dummy, "FTP", IPPORT_FTP, &con);

if (status < 0)
{