Terence Monteiro wrote:
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);
Setting the body expects the parameter to be a file handle unless its a straight scalar.
Your $content, I guess, is a reference to some object, which is what is causing the issues.
Cheers t0m _______________________________________________ List: [email protected] Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[email protected]/ Dev site: http://dev.catalyst.perl.org/
