Catalyst::View::Mason fixed
[catagits/Catalyst-Runtime.git] / lib / Catalyst / Test.pm
index be452c3..dcd839a 100644 (file)
@@ -70,7 +70,7 @@ our $default_host;
     sub import {
         my ($self, $class, $opts) = @_;
         $import->($self, '-all' => { class => $class });
-        $opts ||= {};
+        $opts = {} unless ref $opts eq 'HASH';
         $default_host = $opts->{default_host} if exists $opts->{default_host};
     }
 }
@@ -240,6 +240,10 @@ sub remote_request {
             keep_alive   => 1,
             max_redirect => 0,
             timeout      => 60,
+            
+            # work around newer LWP max_redirect 0 bug
+            # http://rt.cpan.org/Ticket/Display.html?id=40260
+            requests_redirectable => [],
         );
 
         $agent->env_proxy;