[Catalyst] Wrong Content-Length value: 392918

Bill Moseley moseley at hank.org
Tue Jun 8 13:51:22 GMT 2010


I see these errors a few times a day.  I wonder why this is happening --
could the browser really send the wrong content length?  I seem to see it
often in ajax calls for a progress bar, but also during file uploads and
sometimes for just a normal post.

Is there any additional info that could be included in the exception message
that would help explain this?  Perhaps the length of data actual read in
addition to the content-length -- and maybe even the last few bytes read and
the content-type?  Could a failed or closed connection be causing this (and
reported in the message)?


        # paranoia against wrong Content-Length header
        my $remaining =3D $length - $self->read_position;
        if ( $remaining > 0 ) {
            $self->finalize_read($c);
            Catalyst::Exception->throw(
                "Wrong Content-Length value: $length" );
        }


-- =

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


More information about the Catalyst mailing list