stas 2003/12/18 23:15:06 Modified: src/docs/2.0/user/handlers protocols.pod Log: rewrite the error checking, separating it from the empty bb test Revision Changes Path 1.13 +6 -6 modperl-docs/src/docs/2.0/user/handlers/protocols.pod Index: protocols.pod =================================================================== RCS file: /home/cvs/modperl-docs/src/docs/2.0/user/handlers/protocols.pod,v retrieving revision 1.12 retrieving revision 1.13 diff -u -u -r1.12 -r1.13 --- protocols.pod 17 Nov 2003 22:10:06 -0000 1.12 +++ protocols.pod 19 Dec 2003 07:15:06 -0000 1.13 @@ -345,16 +345,14 @@ while (1) { my $rv = $c->input_filters->get_brigade($bb_in, Apache::MODE_GETLINE); - - if ($rv != APR::SUCCESS or $bb_in->empty) { + if ($rv != APR::SUCCESS && $rv != APR::EOF) { my $error = APR::strerror($rv); - unless ($rv == APR::EOF) { - warn "get_brigade: $error\n"; - } - $bb_in->destroy; + warn __PACKAGE__ . ": get_brigade: $error\n"; last; } + last if $bb_in->empty; + while (!$bb_in->empty) { my $bucket = $bb_in->first; @@ -383,6 +381,8 @@ $c->output_filters->pass_brigade($bb_out); last if $last; } + + $bb_in->destroy; Apache::OK; }
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]