[Catalyst] Out of Memory - File delivery issue

neil.lunn neil at mylunn.id.au
Thu May 2 12:13:43 GMT 2013


On 2/05/2013 8:47 PM, Craig Chant wrote:

Few things I missed out of the meat. Sorry.
> I don't use static::simple on the Catalyst system for the production server as that is IIS7 and handles static files outside of Catalyst.
Don't think you should outside of development anyhow. Better handled by 
your front end web server, which is what you are doing and what 
Static::Simple is [simply] there to emulate.
> Gleaning from the Neil's reply I get the feeling if I take Catalyst out of the equation for delivering the response (file), this will solve the problem.
>
> However, how do I have a controller that uses the default 'render_view' for some paths and not for others?
So hence the point in the example code of the sub end : Private {}
It's an override. As the Catalyst dispatch mechanism will call the most 
local 'end' method, as in the one in the current controller.
So what you do is isolate these 'streamed' responses in their own 
controller.

> I assume it is a breach of MVC to have the model deliver the resulting CSV does that include the controller?
>
> Is it possible to have the controller print direct to browser...
And hence yes. All in the documentation to Catalyst::Response, thus 
$c->response. Even $c->response->body is a way of bypassing the view. 
There is even $c->write.

Neil




More information about the Catalyst mailing list