Subject: | POE::Component::Client::HTTP::check_redirect emit warning |
POE::Component::Client::HTTP::check_redirect at line 399 (For SVN version 210):
my $max = $self->[REQ_FACTORY]->max_redirect_count;
result of POE::Component::Client::HTTP::RequestFactory::max_redirect_count might be undefined, but $max variable used later without check is it defined.
I'm proposing patch to POE::Component::Client::HTTP::RequestFactory if it receives undefined FollowRedirects parameter on constructor, default its internal variable to 0.
I think it is the right way because in POE::Component::Client::HTTP said that FollowRedirects defaults to 0.
Thank you in advance!
Index: RequestFactory.pm
===================================================================
--- RequestFactory.pm (revision 210)
+++ RequestFactory.pm (working copy)
@@ -115,7 +115,7 @@
my $from = delete $params->{From};
my $no_proxy = delete $params->{NoProxy};
my $proxy = delete $params->{Proxy};
- my $follow_redirects = delete $params->{FollowRedirects};
+ my $follow_redirects = delete $params->{FollowRedirects} || 0;
my $timeout = delete $params->{Timeout};
# Process HTTP_PROXY and NO_PROXY environment variables.