Subject: | max_redirect=>0 don`t work! |
max_redirect=>0 don`t work!
Always sending one redirected request :(
Bug in function request:
sub request
{
my($self, $request, $arg, $size, $previous) = @_;
LWP::Debug::trace('()');
vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
my $response = $self->simple_request($request, $arg, $size);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Where checking variable $self->{max_redirect} ?
------------------------------------------------------------------
if ($previous) {
$response->previous($previous);
# Check for loop in the redirects, we only count
my $count = 0;
my $r = $response;
while ($r) {
if (++$count > $self->{max_redirect}) {
$response->header("Client-Warning" =>
"Redirect loop detected (max_redirect = $self->{max_redirect})");
return $response;
}
$r = $r->previous;
}
Hint: requests_redirectable=>[]
It`s work.