andk / cpanpm

CPAN.pm
87 stars 79 forks source link

RT-145462: HTTP status code check in cpan is too inclusive #166

Open briandfoy opened 1 year ago

briandfoy commented 1 year ago

I'm transferring and splitting up some issues reported in App::Cpan many problems, multiple fixes.

In App::Cpan::getfile, there is this overly inclusive line:

last if( 200 <= $status_code and $status_code <= 300 );

It should not include 300.

However, cpan(1) should also delegate the downloading to CPAN.pm perhaps (#163).

Patch provided by "eponymous alias" eponymousalias@yahoo.com in the RT ticket App.Cpan.patch.txt