- Doc updates from Jester
- User agent fixes from ANDREMAR
+ - Fix bug where redirect was followed on a 500 response
0.50 Tue Feb 17 09:12 GMT 2009
- Remove warning in HTTP::Cookies
# check if that was a redirect
if ( $response->header('Location')
+ && $response->is_redirect
&& $self->redirect_ok( $request, $response ) )
{
-ashb = Ash Berlin <ash_github@firemirror.com>
+ash = Ash Berlin <ash_github@firemirror.com>
package Catty;
use strict;
+use warnings;
#use Catalyst;
use Catalyst;
}
}
+sub redirect_with_500 : Global {
+ my ( $self, $c ) = @_;
+ $DB::single = 1;
+ $c->res->redirect( $c->uri_for("/bonjour"));
+ die "erk!";
+}
+
sub die : Global {
my ( $self, $context ) = @_;
my $html = html( "Die", "This is the die page" );
-#!perl -T
+#!perl
use strict;
use warnings;
use lib 'lib';
-use Test::More tests => 27;
+use Test::More tests => 28;
use lib 't/lib';
use Test::WWW::Mechanize::Catalyst 'Catty';
ok( $prev, "have a previous previous" );
is( $prev->code, 302, "was a redirect" );
like( $prev->header('Location'), '/hi$/', "to the right place" );
+
+$m->get("$root/redirect_with_500");
+is ($m->status, 500, "Redirect not followed on 500");