[Catalyst] returning empty 200 response

Jonathan Rockway jon at jrock.us
Fri Oct 26 20:23:43 GMT 2007


Devo Coran wrote:
> but the problem is it keeps going to =

> /end
> MyApp::View::TT->process =

>   =


You probably want a different end action in this controller:

   sub end :Private {
      my ($self, $c) =3D @_;
      $c->detach($c->view('Static'));
   }


RenderView (which I assume you are using for the end action in the Root
controller) will try to render the template if the following conditions
aren't met:

    return 1 if $c->req->method eq 'HEAD';
    return 1 if $c->response->body && length( $c->response->body );
    return 1 if scalar @{ $c->error } && !$c->stash->{template};
    return 1 if $c->response->status =3D~ /^(?:204|3\d\d)$/;


Since you don't want a template rendering, but you don't meet any of
these conditions, you need your own end action.

Regards,
Jonathan Rockway


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 370 bytes
Desc: OpenPGP digital signature
Url : http://lists.scsys.co.uk/pipermail/catalyst/attachments/20071026/6b89=
3c82/signature.pgp


More information about the Catalyst mailing list