perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Geoffrey Young <ge...@modperlcookbook.org>
Subject Re: Apache::Registry HEAD request also return document body
Date Sat, 05 Jun 2004 21:41:44 GMT
cc'ing the modperl list for the benefit of all

Bruno De Fraine wrote:
> Hello Geoffrey,
> 
> I'm having a problem with my server (Apache/1.3.29 (Debian GNU/Linux)
> mod_perl/1.29) that got raised on the mod_perl list in 2001:
> Apache::Registry HEAD request also return document body
> http://gossamer-threads.com/lists/modperl/modperl/43829

yeah, it's broken.

> 
> [And although it's considered harmless there, it is actually causing
> data corruption with Mozilla, see
> http://bugzilla.mozilla.org/show_bug.cgi?id=245447 if you're interested.]

wow, a HEAD request in the wild.  nice.

> 
> I'm writing you because you were one of the major contributors to an
> answer. The most complete fix I could find of you is here: [RFC]
> Apache::HEADRegistry
> http://mathforum.org/epigone/modperl/starfaxbi
> But at that date you considered it RFC alphaware. 

I tend to put the alphaware disclaimer on just about everything I write ;)

> Before I go ahead with
> that one, I want to ask if there is anything more recent, and if you got
> any important feedback.

not really.  IIRC I went a few rounds with one of the folks from the thread
in private, trying to tweak HEADRegistry to work in all circumstances.  also
IIRC the current implementation still falls short in one category, but I
can't recall which one it is.  good thing there's the start of a test suite
(though I doubt it works due to lots of changes in Apache-Test since then).

but other than the test suite, though, there is no reason why it shouldn't
work under most circumstances (with the caveat that I haven't even looked at
that code in maybe two years).  just keep in mind that HEADRegistry uses
Apache::RegistryNG, not Apache::Registry, so there may be slight differences
in the behavior of normal scripts.

> Also, out of curiousity, why is there apparantly no interest in the main
> mod_perl distribution to get this fixed in the default behaviour of
> mod_perl or at least Apache::Registry?

again from memory, but I think it's more difficult to solve in
Apache::Registry than it first appears - the logic that controls this aspect
of Registry is actually in mod_perl core and fairly complex.  there are also
aspects of legacy CGI.pm that call the code in question that make it
difficult to fix the problem under all circumstances.  however, the largest
obstacle is that playing around with long-standing code in the stable (1.0)
mod_perl branch is kind of asking for trouble - I would be (and was) afraid
that fixing this smallish problem in core would cause more harm than good
for others.  yeah, I know that sounds not so great, but...

that said, I am certainly willing to look (again) into fixing core so that
Registry and CGI.pm behave properly.  in the meanwhile, if you give me until
the start of the week I will adjust Apache::HEADRegistry so that the test
suite is functional and review the code so we can begin to explore if that
module is a real option for you.

HTH

--Geoff

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Mime
View raw message