Index: usr.bin/ftp/fetch.c =================================================================== RCS file: /cvsroot/src/usr.bin/ftp/fetch.c,v retrieving revision 1.236 diff -p -u -r1.236 fetch.c --- usr.bin/ftp/fetch.c 25 Feb 2023 12:07:25 -0000 1.236 +++ usr.bin/ftp/fetch.c 17 Jun 2023 14:12:44 -0000 @@ -801,7 +801,10 @@ handle_proxy(const char *url, const char } FREEPTR(pui.path); - pui.path = ftp_strdup(url); + if (ui->utype == HTTPS_URL_T) + pui.path = ftp_strdup(ui->path); + else + pui.path = ftp_strdup(url); freeurlinfo(ui); *ui = pui;