perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Philippe M. Chiasson" <go...@ectoplasm.org>
Subject Re: Bug report $r->read() fail
Date Tue, 07 Mar 2006 23:56:26 GMT
Khai Doan wrote:
> -------------8<---------- Start Bug Report ------------8<----------
> 1. Problem Description:
> 
>    Calling $r->read($buf,0) result in an internal server error, and an entry 
> in error_log: The LENGTH argument can't be negative at .....

A slightly confusing error message, but it's an improper use of $r->read()

From: ./xs/Apache2/RequestIO/Apache2__RequestIO.h
mpxs_Apache2__RequestRec_read(...)
    [...]
    if (len <= 0) {
        Perl_croak(aTHX_ "The LENGTH argument can't be negative");
    }

Doing $r->read($buf, 0) makes no sense, unless you are trying to figure
out if there is data to be read maybe ?

--------------------------------------------------------------------------------
Philippe M. Chiasson m/gozer\@(apache|cpan|ectoplasm)\.org/ GPG KeyID : 88C3A5A5
http://gozer.ectoplasm.org/     F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3A5A5

Mime
View raw message