From fbfd5e0969fa94b51c4f73f13bf0f6d6e56e7440 Mon Sep 17 00:00:00 2001 From: "Robin H. Johnson" Date: Wed, 22 Mar 2023 09:13:15 -0700 Subject: probe-mirmon: workaround: back to wget for FTP Signed-off-by: Robin H. Johnson --- probe-mirmon | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/probe-mirmon b/probe-mirmon index ff73776..a40be16 100755 --- a/probe-mirmon +++ b/probe-mirmon @@ -29,6 +29,11 @@ sub main { if ( $url =~ m,^rsync://, ) { handle_rsync( $timeout, $url ); } + elsif ( $url =~ m,^ftp://, ) { + # Hacky, at some point CURL stopped returning the output here; just go back to wget for now. + #handle_libcurl( $timeout, $url ); + handle_wget( $timeout, $url ); + } else { handle_libcurl( $timeout, $url ); } @@ -44,6 +49,7 @@ sub handle_libcurl { $curl->setopt(CURLOPT_TIMEOUT, $timeout); $curl->setopt(CURLOPT_FTP_USE_EPSV, 1); $curl->setopt(CURLOPT_URL, $url); + $curl->setopt(CURLOPT_VERBOSE, 1) if $url =~ m,^ftp://,; # A filehandle, reference to a scalar or reference to a typeglob can be used here. my $response_body; -- cgit v1.2.3-65-gdbad