commit: fbfd5e0969fa94b51c4f73f13bf0f6d6e56e7440
Author: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
AuthorDate: Wed Mar 22 16:13:15 2023 +0000
Commit: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
CommitDate: Wed Mar 22 16:13:15 2023 +0000
URL:
https://gitweb.gentoo.org/proj/gentoo-mirrorstats.git/commit/?id=fbfd5e09
probe-mirmon: workaround: back to wget for FTP
Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org>
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;