You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@perl.apache.org by Steve Hay <st...@uk.radan.com> on 2003/09/23 10:31:42 UTC
[RESOLVED] Re: [mp2] t/filter/in_str_consume.t failure
Stas Bekman wrote:
> Steve, I still want you to followup on the suggestions I made in the
> previous post, however this should fix the problem. Thanks.
Hurrah! I've just done 12 runs each with and without
APACHE_TEST_PRETEND_NO_LWP set, and all 24 ran OK.
I think you've cracked it at last. Well done!
- Steve
>
>
> Index: t/filter/TestFilter/in_str_consume.pm
> ===================================================================
> RCS file: /home/cvs/modperl-2.0/t/filter/TestFilter/in_str_consume.pm,v
> retrieving revision 1.9
> diff -u -r1.9 in_str_consume.pm
> --- t/filter/TestFilter/in_str_consume.pm 18 Sep 2003 08:10:32
> -0000 1.9
> +++ t/filter/TestFilter/in_str_consume.pm 23 Sep 2003 02:20:10
> -0000
> @@ -106,6 +106,12 @@
>
> if ($r->method_number == Apache::M_POST) {
> my $data = ModPerl::Test::read_post($r);
> +
> + # tell Apache to get rid of the rest of the request body
> + # if we don't a client will get a broken pipe and may fail to
> + # handle this situation gracefully
> + $r->discard_request_body;
> +
> my $len = length $data;
> debug "HANDLER READ: $len bytes\n";
> $r->print($len);
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org
Re: [RESOLVED] Re: [mp2] t/filter/in_str_consume.t failure
Posted by Stas Bekman <st...@stason.org>.
Steve Hay wrote:
> Stas Bekman wrote:
>
>> Steve, I still want you to followup on the suggestions I made in the
>> previous post, however this should fix the problem. Thanks.
>
>
> Hurrah! I've just done 12 runs each with and without
> APACHE_TEST_PRETEND_NO_LWP set, and all 24 ran OK.
>
> I think you've cracked it at last. Well done!
Thanks Steve, even though this is not what I wanted but it makes the test safe
and I've documented what should the filter writer should do in this situation
(consume all the data).
>> +
>> + # tell Apache to get rid of the rest of the request body
>> + # if we don't a client will get a broken pipe and may fail to
>> + # handle this situation gracefully
>> + $r->discard_request_body;
>> +
>> my $len = length $data;
>> debug "HANDLER READ: $len bytes\n";
>> $r->print($len);
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org