Package: libapache-mod-perl
Version: 1.29.0.1-3
Severity: important
Tags: patch
An apache configuration with:
<Location />
PerlSetVar foo '0';
</Location>
Causes $r->dir_config('foo') to return undef unstead of zero. However,
$r->dir_config returns a hashref with the appropriate values set.
Apparently, the following patch[1] fixes this issue, but I have not yet
tried it myself. (It looks reasonable though...)
Index: src/modules/perl/Apache.xs
===================================================================
RCS file: /home/cvspublic/modperl/src/modules/perl/Apache.xs,v
retrieving revision 1.129
diff -u -r1.129 Apache.xs
--- src/modules/perl/Apache.xs 16 Sep 2003 19:51:06 -0000 1.129
+++ src/modules/perl/Apache.xs 25 Nov 2003 20:39:41 -0000
@@ -2084,7 +2084,7 @@
&perl_module);
TABLE_GET_SET(c->vars, FALSE);
}
- if (!SvTRUE(RETVAL)) {
+ if (!SvOK(RETVAL)) {
s = r && r->server ? r->server : perl_get_startup_server();
if (s && s->module_config) {
SvREFCNT_dec(RETVAL); /* in case above did newSV(0) */
Don Armstrong
1: http://www.gossamer-threads.com/archive/mod_perl_C1/modperl_F7/PerlSetVar_with_0_value_P90608/
--
"It's not Hollywood. War is real, war is primarily not about defeat or
victory, it is about death. I've seen thousands and thousands of dead
bodies. Do you think I want to have an academic debate on this
subject?"
-- Robert Fisk
http://www.donarmstrong.com
http://www.anylevel.com
http://rzlab.ucr.edu
Attachment:
signature.asc
Description: Digital signature