TWMC: Fix bug where redirect was followed on a 500 response
[catagits/Test-WWW-Mechanize-Catalyst.git] / lib / Test / WWW / Mechanize / Catalyst.pm
index ccc6890..8910c44 100644 (file)
@@ -99,6 +99,7 @@ sub _make_request {
 
     # check if that was a redirect
     if (   $response->header('Location')
+        && $response->is_redirect
         && $self->redirect_ok( $request, $response ) )
     {