=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ftp/fetch.c,v retrieving revision 1.207 retrieving revision 1.208 diff -u -r1.207 -r1.208 --- src/usr.bin/ftp/fetch.c 2021/11/09 12:14:35 1.207 +++ src/usr.bin/ftp/fetch.c 2021/11/10 07:32:55 1.208 @@ -1,4 +1,4 @@ -/* $OpenBSD: fetch.c,v 1.207 2021/11/09 12:14:35 kn Exp $ */ +/* $OpenBSD: fetch.c,v 1.208 2021/11/10 07:32:55 kn Exp $ */ /* $NetBSD: fetch.c,v 1.14 1997/08/18 10:20:20 lukem Exp $ */ /*- @@ -336,7 +336,6 @@ int ishttpsurl = 0; #endif /* !NOSSL */ #ifndef SMALL - char *eurl = NULL; char *full_host = NULL; const char *scheme; char *locbase; @@ -346,8 +345,6 @@ struct stat stbuf; struct tm lmt = { 0 }; struct timespec ts[2]; -#else - char *eurl = NULL; #endif /* !SMALL */ struct tls *tls = NULL; int status; @@ -716,22 +713,11 @@ #endif /* !NOSSL */ epath = url_encode(path); -#ifndef SMALL - if (asprintf(&eurl, "%s%s%s%s/%s", - scheme, - full_host, - portnum ? ":" : "", - portnum ? portnum : "", - epath) == -1) - errx(1, "Cannot build encoded URL"); -#endif if (proxyurl) { -#ifndef SMALL if (verbose) { fprintf(ttyout, "Requesting %s (via %s)\n", - eurl, proxyurl); + origline, proxyurl); } -#endif /* * Host: directive must use the destination host address for * the original URI (path). @@ -748,9 +734,9 @@ proxy_credentials); ftp_printf(fin, "\r\n"); } else { -#ifndef SMALL if (verbose) - fprintf(ttyout, "Requesting %s\n", eurl); + fprintf(ttyout, "Requesting %s\n", origline); +#ifndef SMALL if (resume || timestamp) { if (stat(savefile, &stbuf) == 0) { if (resume) @@ -847,11 +833,7 @@ status = strtonum(ststr, 200, 503, &errstr); if (errstr) { strnvis(gerror, cp, sizeof gerror, VIS_SAFE); -#ifndef SMALL - warnx("Error retrieving %s: %s", eurl, gerror); -#else warnx("Error retrieving %s: %s", origline, gerror); -#endif goto cleanup_url_get; } @@ -897,11 +879,7 @@ break; default: strnvis(gerror, cp, sizeof gerror, VIS_SAFE); -#ifndef SMALL - warnx("Error retrieving %s: %s", eurl, gerror); -#else warnx("Error retrieving %s: %s", origline, gerror); -#endif goto cleanup_url_get; } @@ -1034,11 +1012,7 @@ if (isunavail) { if (retried || retryafter != 0) warnx("Error retrieving %s: 503 Service Unavailable", -#ifndef SMALL - eurl); -#else origline); -#endif else { if (verbose) fprintf(ttyout, "Retrying %s\n", origline); @@ -1161,7 +1135,6 @@ cleanup_url_get: #ifndef SMALL - free(eurl); free(full_host); #endif /* !SMALL */ #ifndef NOSSL