X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=lib%2FMaypole.pm;h=1a86f53ad515c57afb82fa1d1b381f0abcb10b54;hb=ed2bc6057ed94ae64e5b03ff28477fcbac52f4ee;hp=249a3e9a604c874846bf9ad56030c2fc1888efce;hpb=83f49b1a6dd37085046213013288504696d5483e;p=maypole.git diff --git a/lib/Maypole.pm b/lib/Maypole.pm index 249a3e9..1a86f53 100644 --- a/lib/Maypole.pm +++ b/lib/Maypole.pm @@ -12,7 +12,7 @@ use URI::QueryParam; use NEXT; use File::MMagic::XS qw(:compat); -our $VERSION = '2.121'; +our $VERSION = '2.13'; our $mmagic = File::MMagic::XS->new(); # proposed privacy conventions: @@ -575,7 +575,7 @@ sub handler_guts { # process request with model if applicable and template not set. if ($applicable) { - unless ($r->{template}) { + unless ($self->{template}) { eval { $self->model_class->process($self) }; if ( my $error = $@ ) { $status = $self->call_exception($error, "model"); @@ -616,7 +616,7 @@ my %filetypes = ( sub __get_mime_type { my $self = shift; my $type = 'text/html'; - if ($self->path =~ m/.*\.(\w{3,4})$/) { + if ($self->path =~ m/.*\.(\w{2,4})$/) { $type = $filetypes{$1}; } else { my $output = $self->output;