Bug in Apache2::ServerUtil
Hi,
Apache2__ServerUtil.h contains these lines:
static void mpxs_Apache2__ServerUtil_BOOT(pTHX)
{
newCONSTSUB(PL_defstash, "Apache2::ServerUtil::server_root",
newSVpv(ap_server_root, 0));
newCONSTSUB(PL_defstash, "Apache2::ServerUtil::get_server_built",
newSVpv(ap_get_server_built(), 0));
newCONSTSUB(PL_defstash, "Apache2::ServerUtil::get_server_version",
newSVpv(ap_get_server_version(), 0));
newCONSTSUB(PL_defstash, "Apache2::ServerUtil::get_server_banner",
newSVpv(ap_get_server_banner(), 0));
newCONSTSUB(PL_defstash, "Apache2::ServerUtil::get_server_description",
newSVpv(ap_get_server_description(), 0));
}
The problem is that way get_server_banner() and get_server_description() ar=
e
constants. They are instantiated at the time the module is loaded. But
Apache2::ServerUtil can be loaded in a <Perl> container. At that time banne=
r
and description are not yet constant. Modules may add components in open_lo=
gs
and post_config.
The fix is really simple. I have just uploaded Apache2::Banner that does it=
externally (for those who still have to use 2.0.4). Would be good to fix th=
at
in the next mp2 version.
Torsten Förtsch
=2D-
Need professional modperl support? Hire me! (http://foertsch.name)
Like fantasy? http://kabatinte.net
Re: Bug in Apache2::ServerUtil
2011/3/6 Torsten Förtsch <torsten.foertsch [at] gmx.net>:
> The fix is really simple. I have just uploaded Apache2::Banner that does =
it
> externally (for those who still have to use 2.0.4). Would be good to fix =
that
> in the next mp2 version.
1) Submit a diff
2) Wait for feedback
3) Commit
4)????
5) Profit?
Re: Bug in Apache2::ServerUtil
On Wednesday, March 09, 2011 10:48:57 Fred Moyer wrote:
> 2011/3/6 Torsten Förtsch <torsten.foertsch [at] gmx.net>:
> > The fix is really simple. I have just uploaded Apache2::Banner that does
> > it externally (for those who still have to use 2.0.4). Would be good to
> > fix that in the next mp2 version.
>
> 1) Submit a diff
> 2) Wait for feedback
> 3) Commit
> 4)????
> 5) Profit?
ENOTIME
Somewhere near end of March maybe.
The main problem is to conceive a good test.
=46red, there is a limitation with AT that I have hit several times already=
=2E
Maybe you know a simple way to overcome. For example for this problem it wo=
uld
be good to compare the get_server_banner results for a modperl instance wit=
h
an early interpreter start and one without. But that means you need 2
different httpd instances. Apache2::ModSSL has a similar problem. It needs =
to
run the test suite one time with mod_ssl loaded and another run without. Th=
ere
I have solved it by reconfiguring and rerunning in TEST.PL. But that
introduces major drawbacks. You aren't able to use -run-tests or -start-htt=
pd
etc. When it comes to modperl itself, I think there is also need for such a=
feature, I mean running multiple differently configured httpd instances for=
one test suite.
Torsten Förtsch
=2D-
Need professional modperl support? Hire me! (http://foertsch.name)
Like fantasy? http://kabatinte.net