Subject: | This module breaks LWP::UserAgent::requests_redirectable |
If I use this module like this :
my $m = Test::WWW::Mechanize::Catalyst->new;
$m->requests_redirectable( [] );
and then issue a request to a url that responds with a redirect, $m
follows it anyway.
This seems to be because of this in the module source:
if ( grep { $response->code() == $_ } 301, 302, 307 )
{
# do a redirect
}
Maybe the fix is just to replace this with
if ( $self->redirect_ok( $request, $response )
{
}
(ie use the method already defined in LWP::UserAgent which checks things
properly and more besides.)
I'm not completely sure about how this module works, so I'm not too
confident of that. I can help the maintainer with testing if wanted, though.
Daniel