There's a bug in the write_client routine where it won't print a reference to a 
scalar that has been upgraded from a PV.  A string comparison will usually 
trigger an upgrade to PVIV.  Additionally, with PerlTaintCheck on, a tainted 
scalar will be a PVMG, because the tainted flag is magic.  At first I thought 
the latter could be intentional behavior, but passing the string itself instead 
of a reference was allowed, so it appears to be just an oversight.  The attached 
patch fixes both of these cases.

-- 
Stephen Clouse <[EMAIL PROTECTED]>
Senior Programmer, IQ Coordinator Project Lead
The IQ Group, Inc. <http://www.theiqgroup.com/>
diff -ru mod_perl-1.26.orig/src/modules/perl/Apache.xs 
mod_perl-1.26/src/modules/perl/Apache.xs
--- mod_perl-1.26.orig/src/modules/perl/Apache.xs       Fri Jul  6 15:15:04 2001
+++ mod_perl-1.26/src/modules/perl/Apache.xs    Tue Aug 28 20:47:37 2001
@@ -1171,7 +1171,7 @@
 
     for(i = 1; i <= items - 1; i++) {
        int sent = 0;
-        SV *sv = SvROK(ST(i)) && (SvTYPE(SvRV(ST(i))) == SVt_PV) ?
+        SV *sv = SvROK(ST(i)) && (SvTYPE(SvRV(ST(i))) == SVt_PV || 
+SvTYPE(SvRV(ST(i))) == SVt_PVIV || SvTYPE(SvRV(ST(i))) == SVt_PVMG) ?
                  (SV*)SvRV(ST(i)) : ST(i);
        buffer = SvPV(sv, len);
 #ifdef APACHE_SSL

PGP signature

Reply via email to