From 7c9607ed7b752305f7757c2e18cfa4fa03834d27 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Wed, 28 Oct 2009 22:56:32 +0000 Subject: (_download_file): set --user-agent=texlive, requested by CTAN. git-svn-id: svn://tug.org/texlive/trunk@15902 c570f23f-e606-0410-a88d-b1316a301751 --- Master/tlpkg/TeXLive/TLUtils.pm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Master/tlpkg/TeXLive/TLUtils.pm b/Master/tlpkg/TeXLive/TLUtils.pm index 8341b8c605c..bb6aeca29e0 100644 --- a/Master/tlpkg/TeXLive/TLUtils.pm +++ b/Master/tlpkg/TeXLive/TLUtils.pm @@ -2179,7 +2179,7 @@ we try a literal C. Downloading honors two environment variables: C and C. The former overrides the above specification devolving to C, and the latter overrides the default wget -arguments, which are: C<--tries=8 --timeout=60 -q -O>. +arguments. C must be defined so that the file the output goes to is the first argument after the C. Thus, typically it @@ -2225,7 +2225,8 @@ sub download_file { return($ret); } -sub _download_file { +sub _download_file +{ my ($url, $dest, $wgetdefault) = @_; if (win32()) { $dest =~ s!/!\\!g; @@ -2233,7 +2234,7 @@ sub _download_file { my $wget = $ENV{"TL_DOWNLOAD_PROGRAM"} || $wgetdefault; my $wgetargs = $ENV{"TL_DOWNLOAD_ARGS"} - || "--tries=10 --timeout=90 -q -O"; + || "--user-agent=texlive tries=10 --timeout=90 -q -O"; debug("downloading $url using $wget $wgetargs\n"); my $ret; -- cgit v1.2.3