summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2023-03-22 09:13:15 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2023-03-22 09:13:15 -0700
commitfbfd5e0969fa94b51c4f73f13bf0f6d6e56e7440 (patch)
treeb109bb0344b8d739790c06c3bc458332262b4603
parentconf/rsync/g.mirrors.extra: missing mirror (diff)
downloadgentoo-mirrorstats-fbfd5e0969fa94b51c4f73f13bf0f6d6e56e7440.tar.gz
gentoo-mirrorstats-fbfd5e0969fa94b51c4f73f13bf0f6d6e56e7440.tar.bz2
gentoo-mirrorstats-fbfd5e0969fa94b51c4f73f13bf0f6d6e56e7440.zip
probe-mirmon: workaround: back to wget for FTP
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
-rwxr-xr-xprobe-mirmon6
1 files changed, 6 insertions, 0 deletions
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;