On Wed, Sep 27, 2000 at 04:12:23PM -0700, Clayton Mitchell wrote:
> In a handler I want to process all requests and parse the document
> requested and spit it out after marking it up.
> 
> I have put in place this code, but I don't see how to access the actual
> requested document.
> 
> I'm hoping there's already an open filehandle to it somewhere?

There's no open filehandle because the file the HTTP client thinks it's
requesting may not actually exist. For example:

<Location /foo>
    SetHandler perl-script
    PerlHandler Foo::Bar::Baz
</Location>

There isn't necessarily a file/directory ${DOCUMENT_ROOT}/foo - the request
is intercepted by mod_perl before it reaches that state.

There are several different methods for looking at and parsing the request
URI. The one that seems right for you is $r->filename()

BTW, this is documented in `perldoc Apache`. Another useful reference is
the mod_perl reference card.

HTH,

Neil

-- 
Neil Conway <[EMAIL PROTECTED]>
Get my GnuPG key from: http://klamath.dyndns.org/mykey.asc
Encrypted mail welcomed

Violence is to dictatorship as propaganda is to democracy.
        -- Noam Chomsky

PGP signature

Reply via email to