Markus Wichitill wrote:
Stas Bekman wrote:
The access log says that the failing test wasn't really failing, as
you can see the stamp 200, so it must be some glitch on the data
transport level. Could it be a fault of LWP? Try the same test after
you have set:
APACHE_TEST_PRETEND_NO_LWP=1, in which case it won't use LWP as the
client and talk directly through the socket...
not ok 2
OK, so that's not it. Any difference with this patch?
Nope.
I've noticed that there's randomness involved, with or without the
patch. Sometimes the test succeeds, and somestimes it's #1 or #3 instead
of #2, although the latter fails more often.
OK, reverting my last patch (back to normal cvs) and trying this one?
Index: t/conf/modperl_extra.pl
===================================================================
RCS file: /home/cvs/modperl-2.0/t/conf/modperl_extra.pl,v
retrieving revision 1.60
diff -u -r1.60 modperl_extra.pl
--- t/conf/modperl_extra.pl 12 Aug 2004 23:38:02 -0000 1.60
+++ t/conf/modperl_extra.pl 19 Aug 2004 23:38:36 -0000
@@ -158,40 +158,7 @@
# t/TEST -trace=debug -start
sub ModPerl::Test::read_post {
my $r = shift;
- my $debug = shift || 0;
-
- my $bb = APR::Brigade->new($r->pool,
- $r->connection->bucket_alloc);
-
- my $data = '';
- my $seen_eos = 0;
- my $count = 0;
- do {
- $r->input_filters->get_brigade($bb, Apache::MODE_READBYTES,
- APR::BLOCK_READ, IOBUFSIZE);
-
- $count++;
-
- warn "read_post: bb $count\n" if $debug;
-
- for (my $b = $bb->first; $b; $b = $bb->next($b)) {
- if ($b->is_eos) {
- warn "read_post: EOS bucket:\n" if $debug;
- $seen_eos++;
- last;
- }
-
- if ($b->read(my $buf)) {
- warn "read_post: DATA bucket: [$buf]\n" if $debug;
- $data .= $buf;
- }
-
- $b->remove; # optimization to reuse memory
- }
-
- } while (!$seen_eos);
-
- $bb->destroy;
+ my $len = $r->read(my $data, $r->headers_in->{'Content-Length'});
return $data;
}
--
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]