You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@perl.apache.org by Randy Kobes <ra...@theoryx5.uwinnipeg.ca> on 2003/09/02 03:44:06 UTC

Re: [mp2] cgi tests

On Mon, 25 Aug 2003, Stas Bekman wrote:

> Randy Kobes wrote:
> > On Sun, 24 Aug 2003, Stas Bekman wrote:
> >
> >>Randy Kobes wrote:
> >>>   I'm just wondering if anyone has seen any problems with
> >>>the t/modules/cgi.t and/or t/modules/cgiupload.t tests in
> >>>the cvs mp2? On Win32 I'm getting failures (Apache/2.0.47):
[ ... ]
> It's possible that the problem comes from the new PerlIO
> Layer, try testing again after disabling it:

The following seems to fix the problems both with
t/modules/cgi.t and t/modules/cgiupload.t:
============================================================
Index: src/modules/perl/modperl_io_apache.c
===================================================================
RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_io_apache.c,v
retrieving revision 1.3
diff -u -r1.3 modperl_io_apache.c
--- src/modules/perl/modperl_io_apache.c	21 Aug 2003 01:37:20 -0000	1.3
+++ src/modules/perl/modperl_io_apache.c	2 Sep 2003 01:37:55 -0000
@@ -187,7 +187,7 @@
     sizeof(PerlIO_funcs),
     "Apache",
     sizeof(PerlIOApache),
-    PERLIO_K_MULTIARG,
+    PERLIO_K_MULTIARG | PERLIO_K_RAW,
     PerlIOApache_pushed,
     PerlIOApache_popped,
     PerlIOApache_open,
===============================================================
I haven't tested this on Unix, though.
-- 
best regards,
randy

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: [mp2] cgi tests

Posted by Randy Kobes <ra...@theoryx5.uwinnipeg.ca>.
On Tue, 2 Sep 2003, Stas Bekman wrote:

> Randy Kobes wrote:
[ .. ]
> > The following seems to fix the problems both with
> > t/modules/cgi.t and t/modules/cgiupload.t:
> > ============================================================
> > Index: src/modules/perl/modperl_io_apache.c
> > ===================================================================
> > RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_io_apache.c,v
> > retrieving revision 1.3
> > diff -u -r1.3 modperl_io_apache.c
> > --- src/modules/perl/modperl_io_apache.c	21 Aug 2003 01:37:20 -0000	1.3
> > +++ src/modules/perl/modperl_io_apache.c	2 Sep 2003 01:37:55 -0000
> > @@ -187,7 +187,7 @@
> >      sizeof(PerlIO_funcs),
> >      "Apache",
> >      sizeof(PerlIOApache),
> > -    PERLIO_K_MULTIARG,
> > +    PERLIO_K_MULTIARG | PERLIO_K_RAW,
> >      PerlIOApache_pushed,
> >      PerlIOApache_popped,
> >      PerlIOApache_open,
> > ===============================================================
> > I haven't tested this on Unix, though.
>
> Excellent catch, it works on linux (since unix has no need for binmode).
[ .. ]
> Please commit.
>
> Also we probably need to add it to
> xs/APR/PerlIO/apr_perlio.c (again | with
> PERLIO_K_MULTIARG), can you think of a test to add to
> t/response/TestAPR/perlio.t that will break it in a
> similar way, before we fix it?

OK, thanks - I've done that. I'll work on a test that
illustrates the problem for APR::PerlIO, and submit
that soon.

-- 
best regards,
randy

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: [mp2] cgi tests

Posted by Stas Bekman <st...@stason.org>.
Randy Kobes wrote:
> On Mon, 25 Aug 2003, Stas Bekman wrote:
> 
> 
>>Randy Kobes wrote:
>>
>>>On Sun, 24 Aug 2003, Stas Bekman wrote:
>>>
>>>
>>>>Randy Kobes wrote:
>>>>
>>>>>  I'm just wondering if anyone has seen any problems with
>>>>>the t/modules/cgi.t and/or t/modules/cgiupload.t tests in
>>>>>the cvs mp2? On Win32 I'm getting failures (Apache/2.0.47):
> 
> [ ... ]
> 
>>It's possible that the problem comes from the new PerlIO
>>Layer, try testing again after disabling it:
> 
> 
> The following seems to fix the problems both with
> t/modules/cgi.t and t/modules/cgiupload.t:
> ============================================================
> Index: src/modules/perl/modperl_io_apache.c
> ===================================================================
> RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_io_apache.c,v
> retrieving revision 1.3
> diff -u -r1.3 modperl_io_apache.c
> --- src/modules/perl/modperl_io_apache.c	21 Aug 2003 01:37:20 -0000	1.3
> +++ src/modules/perl/modperl_io_apache.c	2 Sep 2003 01:37:55 -0000
> @@ -187,7 +187,7 @@
>      sizeof(PerlIO_funcs),
>      "Apache",
>      sizeof(PerlIOApache),
> -    PERLIO_K_MULTIARG,
> +    PERLIO_K_MULTIARG | PERLIO_K_RAW,
>      PerlIOApache_pushed,
>      PerlIOApache_popped,
>      PerlIOApache_open,
> ===============================================================
> I haven't tested this on Unix, though.

Excellent catch, it works on linux (since unix has no need for binmode). From 
the perliol manpage:

            * PERLIO_K_RAW
                The layer is acceptable to have in a binmode(FH) stack - i.e.
                it does not (or will configure itself not to) transform bytes
                passing through it.
CGI.pm has:

if ($needs_binmode) {
     $CGI::DefaultClass->binmode(main::STDOUT);
     $CGI::DefaultClass->binmode(main::STDIN);
     $CGI::DefaultClass->binmode(main::STDERR);
}

Please commit.

Also we probably need to add it to xs/APR/PerlIO/apr_perlio.c (again | with 
PERLIO_K_MULTIARG), can you think of a test to add to 
t/response/TestAPR/perlio.t that will break it in a similar way, before we fix it?


__________________________________________________________________
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