More on the set_handlers() / push_handlers() bug...

2000-07-07 Thread Christian Gilmore

Hello, again.

Here's a quick summary of the problem: upon clearing the stack of handlers
(with set_handlers(PerlAuthzHandlers = undef)) the server appears to not
recognize when it has found a DirectoryIndex file and returns the contents
of a directory instead of the index file.

Since last writing on this topic, I upgraded to all of the newest versions
(apache-1.3.12, perl-5.6, mod_perl-1.24) and configured mod_perl with
PERL_TRACE=1. Looking at the error_log with the handler tracing on and httpd
running in single-server mode, I discovered that the server does appear to
cycle through the directory indexes, but doesn't realize when it has found
one. I've attached two error logs for the request
http://dw3.tivoli.com:81/home/passwd/group/: one with the cache enabled, one
without. I've also attached a copy of the document returned by the server
for the with-authz-cache request. The document is the auto-generated
contents of the directory. As you can see, index.phtml does exist in the
directory and is the first file searched for by the server.

Does anyone have any ideas here? Can anyone reproduce the problem? I've also
included the source for the AuthzCache and AuthzLDAP. If anyone could use at
least the Cache code and see if you could reproduce the problem, I'd really
appreciate it.

I noticed that the error log with the cache enabled shows that subsequent
internal requests (such as those you see when requesting a directory instead
of a named file) don't reset the handler stack to what is in the
configuration. See about line 65 of each log file for this difference.

Regards,
Christian

-
Christian Gilmore
Infrastructure  Tools Team Lead
Web  Multimedia Development
Tivoli Systems, Inc.

 AuthzCache.pm
 AuthzLDAP.pm
Title: Index of /home/passwd/group


 
 
Index of /home/passwd/group
 NameLast modified   Size  Description

 Parent Directory18-May-2000 11:25  -  
 display_group_info.p.. 07-Jun-2000 10:4511k  
 group.phtml 08-Jun-2000 17:3818k  
 index.phtml 05-Jun-2000 12:13 7k  

Apache/1.3.12 Server at dw3.tivoli.com Port 81

 error_log_with_cache
 error_log_without_cache


RE: More on the set_handlers() / push_handlers() bug...

2000-07-07 Thread Christian Gilmore


 Forgive me for the obvious and probably stupid questions, (especially
 since I didn't see the earlier posts in which you probably answered
 them =o)  but just for the record --

No problem. I appreciate your trying to help!

 Could you be misspelling "PerlAuthzHandler"? I note you said
 "PerlAuthzHandlers" with an 's' below Is that a feature I should
 kick myself for not being aware of? Or maybe just an email typo? Or a
 code error? (I do see it's a stack of handlerS, but)

Heh. No, that was just a typo in my mail. I have it right in the handler
code, which I had attached.

 Why undefine the handlers? Could you just use
  $r-set_handlers( PerlAuthzHandler = [ \OK ] );
 or something?  Could that be part of the problem? (Though I don't see
 how.I'm still pretty new to this.)

Well, setting it to undef is what is recommended in the "Apache Modules"
book (page 466), but I have tried setting it to \OK. Setting it to \OK
turns out to do nothing at all. The server ignores your attempted change
(even though it shows that it did change when you look at get_handlers) and
continues as if you never even called set_handlers.

Please, if you have the time and opportunity, give the AuthzCache a try. I'd
really like to know that others can reproduce the problem. It can wrap
around any perl Authz handler as follows:

PerlAuthzHandler Tivoli::Apache::AuthzCache your authz handler here
Tivoli::Apache::AuthzCache::manage_cache

Regards,
Christian

-
Christian Gilmore
Infrastructure  Tools Team Lead
Web  Multimedia Development
Tivoli Systems, Inc.