Apache::Registry HEAD fix

2002-01-29 Thread Jean-Michel Hiver

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
  [EMAIL PROTECTED]
  +44 (0)114 221 4968

  VISIT HTTP://WWW.MKDOC.COM



Registry.pm
Description: Perl program


Re: Apache::Registry HEAD fix

2002-01-29 Thread Geoffrey Young

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



Re: Apache::Registry HEAD fix

2002-01-29 Thread Jean-Michel Hiver

  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-modperlm=100687034903369w=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
  [EMAIL PROTECTED]
  +44 (0)114 221 4968

  VISIT HTTP://WWW.MKDOC.COM