On Thu, 3 Jul 2003, Steve Hay wrote:

> Philippe M. Chiasson wrote:
> >The URL
> >    http://perl.apache.org/dist/mod_perl-1.28.tar.gz
> >has entered CPAN
> >
> I still get the same test failures that I reported before when
> RC2 was announced:
>
> modules/request.......FAILED tests 3-8
>         Failed 6/10 tests, 40.00% okay
>
> Setup: Windows XP, Perl 5.8.0, Apache 1.3.27, Apache-Test 1.03,
> libapreq-1.2 (built/installed *after* mod_perl 1.28).
>
> I used to have "All tests successful" under mp-1.27.

This may be a problem with libapreq - the mod_perl
t/modules/request.t tests, among other things, the sizes involved
with file uploads. The error log you posted earlier reported a
difference in these sizes for three (text) files, with a binary
(gif) file apparently OK (interestingly, with a patch I posted
earlier to allow Win32 ActivePerl 8xx to be used with mod_perl 1
(with LARGE_FILES support), I get a failure with the gif file,
but not the text files). Anyway, could you see if the following
helps (applied to the libapreq sources)? For me, this allows all
the mod_perl t/modules/request tests to pass.
============================================================
Index: Request/Request.xs
===================================================================
RCS file: /home/cvs/httpd-apreq/Request/Request.xs,v
retrieving revision 1.36
diff -u -r1.36 Request.xs
--- Request/Request.xs  25 Jun 2003 07:59:37 -0000      1.36
+++ Request/Request.xs  4 Jul 2003 05:32:59 -0000
@@ -533,7 +533,7 @@
     if (fd < 0)
         XSRETURN_UNDEF;

-    if ( !(RETVAL = PerlIO_fdopen(fd, "r")) )
+    if ( !(RETVAL = PerlIO_fdopen(fd, "rb")) )
        XSRETURN_UNDEF;
 #else
     if (  ( RETVAL = PerlIO_importFILE(fp,0) ) == NULL  )
@@ -558,7 +558,7 @@
        PerlIO *fp;

        fd = PerlLIO_dup(fd);
-       if (!(fp = PerlIO_fdopen(fd, "r"))) {
+        if (!(fp = PerlIO_fdopen(fd, "rb"))) {
            PerlLIO_close(fd);
            croak("fdopen failed!");
        }
========================================================
The first "r" -> "rb" change (which affects the mod_perl tests)
is only relevant for Perl > 5.7, which is why this problem didn't
arise on Win32 with Perl-5.6. Also, I think this "r" -> "rb"
doesn't have any effect on Unix, but I haven't tested this.

-- 
best regards,
randy

Reply via email to