use Catalyst::Utils;
use namespace::autoclean;
-our $VERSION = '0.30';
+our $VERSION = '0.32';
has _static_file => ( is => 'rw' );
has _static_debug_message => ( is => 'rw', isa => ArrayRef[Str] );
+after setup_finalize => sub {
+ my $c = shift;
+
+ # New: Turn off new 'autoflush' flag in logger (see Catalyst::Log).
+ # This is needed to surpress output of debug log messages for
+ # static requests:
+ $c->log->autoflush(0) if $c->log->can('autoflush');
+};
+
before prepare_action => sub {
my $c = shift;
my $path = $c->req->path;
# load up a MIME::Types object, only loading types with
# at least 1 file extension
$config->{mime_types_obj} = MIME::Types->new( only_complete => 1 );
-
- # preload the type index hash so it's not built on the first request
- $config->{mime_types_obj}->create_type_index;
};
# Search through all included directories for the static file