> -----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
> 

bonjour!

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.

HTH

--Geoff

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to