You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Jean-Michel Hiver <jh...@mkdoc.com> on 2002/01/29 14:39:54 UTC
Apache::Registry HEAD fix
Hi mod_perl Geeks,
A few weeks ago I raised the issue of Apache::Registry issuing
incorrect headers in the case of a HEAD request, as it's also
returning the headers.
Geoffrey Young came up with a subclass of Apache::RegistryNG, and I
forgot everything about it until yesterday, when I realized that it
was working with none of my scripts :-/
Anyway as promised, (late, but...) here is something that seems to
work OK and that's not _too_ hackish. Please take some time to test
it, and maybe change the module name :-)
Tell me what you think!
Cheers,
--
IT'S TIME FOR A DIFFERENT KIND OF WEB
================================================================
Jean-Michel Hiver - Software Director
jhiver@mkdoc.com
+44 (0)114 221 4968
================================================================
VISIT HTTP://WWW.MKDOC.COM
Re: Apache::Registry HEAD fix
Posted by Jean-Michel Hiver <jh...@mkdoc.com>.
> > I tried it with the product I'm working
> > on and it just kept outputting blank body data.
>
> hmph. very odd. I guess we need to trace the output to see what's going on.
Yep. Lots of wierdness... The only thing I can assure is that the script
works fine under mod_cgi, and is messing with Apache objects at all.
> > I am now using a very simple script and I have realized that my solution
> > does not work in all cases either :-)
>
> yes, that's what I pointed out before :)
>
> http://marc.theaimsgroup.com/?l=apache-modperl&m=100687034903369&w=2
Wow, that's different now. I'm not redirecting to >/dev/null but to a
temp file from which I extract the headers.
> ok. in true programmer fashion, of course I think my approach is better :) at least, it
> seems less hackish to me, and playing with STDOUT just isn't typical in mod_perl, since
> it's really tied behind the scenes.
Well actually I tend to agree with that. I don't really like the fact
that I need to create temp files, nor redirect STDOUT. But hey, I'm just
trying to get this stuff working OK... and I can't find any decent
online API reference for Apache::RegistryNG. Besides, the edition of
"Writing Apache modules with Perl and C" that I'm using doesn't seem to
cover all Apache::Registry API. Sigh...
> anyway, if you send me a sample script I can play with it some. for the most part, my
> stuff is code ripped right from mod_perl core, but there could be something subtle going
> on that is easily fixable.
Okay dokay. I'll stop playing with my mailer and try to do some
debugging work now :-)
Cheers,
--
IT'S TIME FOR A DIFFERENT KIND OF WEB
================================================================
Jean-Michel Hiver - Software Director
jhiver@mkdoc.com
+44 (0)114 221 4968
================================================================
VISIT HTTP://WWW.MKDOC.COM
Re: Apache::Registry HEAD fix
Posted by Geoffrey Young <ge...@modperlcookbook.org>.
Jean-Michel Hiver wrote:
>
> Hi mod_perl Geeks,
>
> A few weeks ago I raised the issue of Apache::Registry issuing
> incorrect headers in the case of a HEAD request, as it's also
> returning the headers.
>
> Geoffrey Young came up with a subclass of Apache::RegistryNG, and I
> forgot everything about it until yesterday, when I realized that it
> was working with none of my scripts :-/
hmph. what about it wasn't working? I mean, I tested it with some plain CGI.pm scripts,
and it seemed to work fine.
do you have any more information? perhaps a sample script I can test it with?
--Geoff