Changeset 108
- Timestamp:
- 01/27/10 00:59:18 (3 years ago)
- Files:
-
- trunk/lib/Mungo/Response.pm (modified) (1 diff)
- trunk/t/11-redirect.t (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/lib/Mungo/Response.pm
r105 r108 451 451 } 452 452 } 453 $self->Flush(); 453 # If we have any data to write, or have written anything 454 # then the ball in our court. 455 # However, if we haven't, we should pass the status back 456 # from the main handler so that Apache ErrorDocs wil work. 457 if(($_r->{data}->{Buffer} && length($one_true_buffer)) || 458 $_r->{data}->{'__OUTPUT_STARTED__'}) { 459 $self->Flush(); 460 } 461 else { 462 $self->{Mungo}->{data}->{ApacheResponseCode} = $_r->{data}->{Status}; 463 } 454 464 eval { goto MUNGO_HANDLER_FINISH; }; # Jump back to Mungo::handler() 455 465 } trunk/t/11-redirect.t
r96 r108 50 50 label => "Page with text after redirect", 51 51 status => 302, 52 initial_like => qr{ ^$},52 initial_like => qr{302 Found}, 53 53 redirect_like => qr{^mungo-redirect-success$}, 54 54 }, … … 56 56 label => "Page with headers prior to redirect", 57 57 status => 302, 58 initial_like => qr{ ^$},58 initial_like => qr{302 Found}, 59 59 initial_header => [ 'X-mungo-test-header' => 'ponies' ], 60 60 redirect_like => qr{^mungo-redirect-success$},
