From: Christian Walde Date: Sun, 5 Jun 2011 15:27:25 +0000 (+0200) Subject: Enabled content type css for css files served by template, previous implementation... X-Git-Tag: 0.003005~10^2 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FGitalist.git;a=commitdiff_plain;h=e1a23af1e0fa1ee2aa13ba3055c258e559ee4f93 Enabled content type css for css files served by template, previous implementation was non-functional, but nobody noticed since some browsers paper over such messes. --- diff --git a/lib/Gitalist/Controller/Root.pm b/lib/Gitalist/Controller/Root.pm index ddcc83a..7b921f8 100644 --- a/lib/Gitalist/Controller/Root.pm +++ b/lib/Gitalist/Controller/Root.pm @@ -22,8 +22,7 @@ sub index : Chained('base') PathPart('') Args(0) { sub css : Chained('/root') PathPart('core.css') Args(0) { my ( $self, $c ) = @_; - $c->response->content_type('text/css'); - $c->stash(template => 'static/css/core.css'); + $c->stash( template => 'static/css/core.css', content_type => 'text/css' ); } sub base : Chained('/root') PathPart('') CaptureArgs(0) { @@ -92,7 +91,8 @@ __PACKAGE__->config( map { $_ => [qw/ View Default /] } qw( text/css text/html text/plain application/atom+xml application/rss+xml application/rss ) - } + }, + content_type_stash_key => 'content_type', ); __PACKAGE__->meta->make_immutable;