[Catalyst] Setting file handle as the response body generates warnings.

Bill Moseley moseley at hank.org
Wed Nov 20 04:01:09 GMT 2013


On Tue, Nov 19, 2013 at 6:34 PM, John Napiorkowski <jjn1056 at yahoo.com>wrote:

>
> This looks familiar, but I thought we fixed this... what version of
> Catalyst are you using here?
>

I just updated:


$ perl -MCatalyst -le 'print Catalyst->VERSION'
5.90051

 I can debug more in the morning -- anything specific I should look at?

It's pretty easy to reproduce:

package Zip::Controller::Root;
...

use IO::Uncompress::Gunzip;
use IO::Compress::Gzip qw/ gzip $GzipError /;

sub uncompress : Local {
    my ( $self, $c ) =3D @_;

    my $uncompressed =3D "This is some text that can be compressed.\n" x 5;
    my $compressed;
    gzip( \$uncompressed, \$compressed ) || die $GzipError;

    $c->res->body( IO::Uncompress::Gunzip->new( \$compressed ) );

    return;
}



$ script/zip_test.pl /uncompress

-s on unopened filehandle GEN2 at
/home/bill/perl5/perlbrew/perls/perl-5.14.2/lib/site_perl/5.14.2/Catalyst.pm
line 1948, <DATA> line 1000.
[warn] Serving filehandle without a content-length
This is some text that can be compressed.
This is some text that can be compressed.
This is some text that can be compressed.
This is some text that can be compressed.
This is some text that can be compressed.


-- =

Bill Moseley
moseley at hank.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20131119/9e77a=
243/attachment.htm


More information about the Catalyst mailing list