[Catalyst] HTTP Response body doesn't get sent

Terence Monteiro terence at deeproot.co.in
Fri Apr 3 12:33:13 GMT 2009


In my Catalyst application, I'm reading an attachment of a multipart
message into a variable and trying to send it as HTTP response. I've set
the content type too, but I don't get the file on the browser.

I'm getting the following in the log:

Caught exception in engine "Not a GLOB reference at
/usr/local/share/perl/5.8.8/Catalyst/Engine.pm line 47."

I'm dumping the same variable contents into a temp file, and on
checking, it gives me the same content and content length as is being
set as $c->res->body and $c->res->content_length respectively. I'm using
Marc Overmeer's Mail::Box module to parse the message and fetch the
attachment.

Controller action code:
    # fetching $content
    $c->res->body($content);
    my $ctype = $attach->contentType;
    $c->res->content_type($ctype);

In end action:
    my ( $self, $c ) = @_;

    return 1 in $c->res->body;
    ...

Ubuntu 8.10
Linux kernel 2.6.27
Perl version 5.10
Catalyst 5.71001
Mail::Box 2.078

Anything else needed?

-- 
Regards, Terence.
http://www.deeproot.in 
Ph: +91 (80) 4089 0000




More information about the Catalyst mailing list