[Catalyst] Large static files behind Authorisation
Kieren Diment
diment at gmail.com
Sun Jan 4 11:56:22 GMT 2009
On 04/01/2009, at 10:47 PM, Trevor Phillips wrote:
> On Sun, Jan 4, 2009 at 7:48 PM, Tomas Doran <bobtfish at bobtfish.net>
> wrote:
>>
>> 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 ) = @_;
>> $c->serve_static_file('some_file');
>> $c->stash->{file_output} = 1;
>> }
>>
>> sub end : Private {
>> my ( $self, $c ) = @_;
>> $c->detach('render') unless $c->stash->{file_output};
>> }
>>
>> sub render : ActionClass('RenderView') {}
>
> That sort of worked! It definitely turned off the template - but I was
> getting no file output still, which agrees with what Nickolay said.
>
> I stripped down my download action to the bare minimum and did get it
> working - the problem was that I was using :Path :Args to define the
> matching path. When I changed to using Local, it worked correctly.
>
> Why should it matter to serve_static_file if I specify :Path :Args or
> use Local? The routine was definitely being called either way - just
> the file output wasn't working.
>
Sounds like this might be a bug. Can you provide a minimal app as a
test case demonstrating the problem?
More information about the Catalyst
mailing list