Hi all,

On my system I have a global PerlHandler module that processes all incoming 
requests.  Within itself, the module filters out requests that are not of 
particular MIME types or requests containing '/resources/' in their uris 
and lets them to be processed by their intended handlers (by returning 
DECLINED).

What I want to add next is the logic to proxy all POST requests for .xml 
files to a different invocation of the server running under a different 
user/group so that the files can be updated with POSTed data.

For this job I decided to use the rewerite module with the following rule:

    RewriteCond %{REQUEST_METHOD}   ^POST$
    RewriteRule ^(.*\.xml.*)$ http://localhost:8088$1 [P]

The problem is that my main PerlHandler gets called right after the rewrite 
module is done and I end up with the following error message in the error log:

    File does not exist: proxy:http://localhost:8088/data.xml

I've tried returning DECLINED from the handler to let the proxy module to 
kick in (with return DECLINED if $r->filename =~ m/^proxy:/;), but I still 
get the same error message.

In the configuration file, the rewrite rule come before the mod_perl 
handler is set.

Am I trying to do the impossible?  Or am I simply missing something obvious?

Thanks in advance for comments

Dmitry

Reply via email to