Re: check response with mod_perl

From: Leendert Bottelberghs (leendert_at_wouter.unitedknowledge.net)
Date: 11/10/04

  • Next message: Peter Scott: "Re: Local install of modules - no root; no telnet"
    Date: Wed, 10 Nov 2004 15:13:11 +0100
    
    

    Hi Tom,

    first of all, let me try to understand your question. You say a "401 http
    response arrives". Do you mean by this that the apache server has
    generated a 401 response (NOT FOUND), and before this response is returned
    to the client, you want to intercept the process and create your own
    response.
    As you might know, mod_perl enables you to hook into the different phases
    of the apache request handling process. The response phase is about the
    last phase in this process. I'm not sure whether you can setup a handler
    that will check the response before it is actually sent (without doin lots
    of other stuff). You could check if the PerlFixupHandler is of any help
    (see: http://www.apacheref.com/ref/mod_perl/PerlFixupHandler.html). You
    are able to check and set the status of a request within a mod_perl handler (see:
    http://search.cpan.org/~gozer/mod_perl-1.29/Apache/Apache.pm#SETTING_UP_THE_RESPONSE)

    If I understood your question wrong, please let me know.

    -leendert bottelberghs

    Op Fri, 22 Oct 2004 10:23:22 -0700, schreef tom:

    > hello
    >
    > i am new to mod_perl. after reading the basic documentation i am still
    > not sure if i am able to do the following with mod_perl.
    >
    > if a 401 http response arrives and the request url doesn't contain
    > e.g. "/adminApp" then forward the request to /adminApp. else return
    > the 401 response to the client (resp. do nothing).
    >
    > is this possible with mod_perl?
    >
    > thanks for your answer,
    > tom


  • Next message: Peter Scott: "Re: Local install of modules - no root; no telnet"

    Relevant Pages