When using Fetch to download a url from Teamcity I get a Fetch failed! error. But the download of the file actually works.
They have recently changed permissions of our Teamcity server so i've to use a username and password when obtaining the URL of the file to download. I'm just wondering if this is causing an issue with fetch's validation of the Gateway, but as I can download the file. Is there a way to suppress this error or just downgrade it to a warning?
Perl Code:
my $ff = File::Fetch->new(uri => "$uri");
my $where = $ff->fetch ( to => "$DOWNLOAD_LOCATION" );
print Dumper($ff);
Output:
Fetch failed! HTTP response: 502 Bad Gateway [502 notresolvable] at
<path>\myfile.pl line 249.
Dumper Output:
$VAR1 = bless( {'vol' => '',
'file_default' => 'file_default',
'_error_msg' => 'Fetch failed! HTTP response: 502 Bad Gateway [502 notresolvable]',
'file' => 'myfilename.zip',
'scheme' => 'http',
'path' => '/repository/download/buildlabel/1042086:id/',
'_error_msg_long' => 'Fetch failed! HTTP response: 502 Bad Gateway [502 notresolvable] at C:/Perl/lib/File/Fetch.pm line 598.