wget: do not ask for TLS-encrypted downloads on plain ftp:// URLs

function                                             old     new   delta
wget_main                                           2422    2431      +9

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko
2018-02-08 00:28:30 +01:00
parent 47529d3f16
commit 237a900bc5

View File

@ -807,11 +807,13 @@ static FILE* prepare_ftp_session(FILE **dfpp, struct host_info *target, len_and_
*dfpp = open_socket(lsa); *dfpp = open_socket(lsa);
#if ENABLE_FEATURE_WGET_HTTPS #if ENABLE_FEATURE_WGET_HTTPS
/* "PROT P" enables encryption of data stream. if (target->protocol == P_FTPS) {
* Without it (or with "PROT C"), data is sent unencrypted. /* "PROT P" enables encryption of data stream.
*/ * Without it (or with "PROT C"), data is sent unencrypted.
if (ftpcmd("PROT P", NULL, sfp) == 200) */
spawn_ssl_client(target->host, fileno(*dfpp), /*flags*/ 0); if (ftpcmd("PROT P", NULL, sfp) == 200)
spawn_ssl_client(target->host, fileno(*dfpp), /*flags*/ 0);
}
#endif #endif
if (G.beg_range != 0) { if (G.beg_range != 0) {