[Catalyst] Large static files behind Authorisation

Nickolay Platonov nickolay8 at gmail.com
Sun Jan 4 11:09:22 GMT 2009


Thats strange, because as I know default template (actually default View) is
applying only if the response body is empty..

On Sun, Jan 4, 2009 at 1:48 PM, Tomas Doran <bobtfish at bobtfish.net> wrote:

>
> On 4 Jan 2009, at 08:48, Trevor Phillips wrote:
>
>> I'm currently trying to use Catalyst::Plugin::Static::Simple, which has a
>> documented function serve_static_file to serve a static file from a
>> Controller. However, I am getting an error as the TT View is still tryin=
g to
>> apply a default template.
>>
>
> Just use a stash key to indicate that you have served a file yourself to
> stop calling TT.. e.g.
>
> sub serve_stuff : Local {
>    my ( $self, $c ) =3D @_;
>    $c->serve_static_file('some_file');
>    $c->stash->{file_output} =3D 1;
> }
>
> sub end : Private {
>    my ( $self, $c ) =3D @_;
>    $c->detach('render') unless $c->stash->{file_output};
> }
>
> sub render : ActionClass('RenderView') {}
>
> Cheers
> t0m
>
>
> _______________________________________________
> List: Catalyst at lists.scsys.co.uk
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive:
> http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
> Dev site: http://dev.catalyst.perl.org/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20090104/cd368=
7ec/attachment.htm


More information about the Catalyst mailing list