--On mardi 27 novembre 2001 09:53 -0500 Geoffrey Young <[EMAIL PROTECTED]> wrote:
>> -----Original Message----- >> From: Eric Cholet [mailto:[EMAIL PROTECTED]] >> Sent: Tuesday, November 27, 2001 7:53 AM >> To: [EMAIL PROTECTED] >> Subject: Multiple PostReadRequest handlers >> >> >> Is it possible to have several PostReadRequest handlers >> run for a request? I have an issue where I define two >> of them but only the second one is being run. >> Maybe this is a matter of the return code of the handlers? >> This is under mod_perl 1.x/apache 1.x >> > > > you should. from http_config.c: > int ap_run_post_read_request(request_rec *r) > { > return run_method(r, offsets_into_method_ptrs.post_read_request, 1); > } > > the '1' in run_method() means that it will keep iterating over the > handlers until they are done. > > compare to: > > int ap_translate_name(request_rec *r) > { > return run_method(r, offsets_into_method_ptrs.translate_handler, 0); > } > > I just ran a test with > > PerlPostReadRequestHandler 'sub { warn "*** inside one"; return > Apache::Constants::OK} ' > PerlPostReadRequestHandler 'sub { warn "*** inside two"; return > Apache::Constants::OK} ' > > and got > > *** inside one at (eval 297) line 1. > *** inside two at (eval 298) line 1. Ah, I know what's going on. I have one handler defined at the top level (outside any container) and one defined in that particular <virtualhost>. >From what I read in mod_perl source, at merge time the latter replaces the former. So I guess I should either declare them both at the same level, either outside of any container, or inside any container where I need both. > bonjour! Merci ! -- Eric Cholet --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
