stas 2004/07/01 17:52:19
Modified: t/response/TestApache discard_rbody.pm Log: do the error checking on $r->discard_request_body Revision Changes Path 1.3 +3 -1 modperl-2.0/t/response/TestApache/discard_rbody.pm Index: discard_rbody.pm =================================================================== RCS file: /home/cvs/modperl-2.0/t/response/TestApache/discard_rbody.pm,v retrieving revision 1.2 retrieving revision 1.3 diff -u -u -r1.2 -r1.3 --- discard_rbody.pm 1 Jun 2004 23:36:16 -0000 1.2 +++ discard_rbody.pm 2 Jul 2004 00:52:19 -0000 1.3 @@ -11,6 +11,7 @@ use Apache::Connection (); use Apache::Filter (); use APR::Brigade (); +use APR::Error (); use Apache::Const -compile => qw(OK MODE_READBYTES); use APR::Const -compile => qw(SUCCESS BLOCK_READ); @@ -43,7 +44,8 @@ # now get rid of the rest of the input data should work, no matter # how little or how much of the body was read - $r->discard_request_body; + my $rc = $r->discard_request_body; + die APR::Error::strerror($rc) unless $rc == Apache::OK; $r->print($test);