Dear Sirs,

I am extensively using mod_dav module. And very often there is
a need to modify WebDAV/HTTP request and response.

Example:
1. User requests resource by the following URL: '/resource'
2. I have to modify the URL as the following: '/{username}/resource'
3. As you can see what has to be done seems like something for mod_rewrite,
but the problem is that the same modification is needed for headers and body
of a request as well (something that mod_rewrite doesn't do).
4. Request is pocessed by a content handler
5. Now we have to do similar modifications with response (headers and body)

I think that the problem is quite generic so instead of hacking/modifying
mod_dav I was thinking of writing separate apache module/filter that can be
reused by other people as well.

So, as it appears to me, I have the following options:
1. Write handler (let's say fixup_handler or url_translate_name_handler) that
will intercept and modify a request, but I cannot use anything like that for
modifying response (as I understand for that matter I have to use filters only,
unless content handler is mod_perl perl handler that is written with chaining
requests in mind). I don't think that combining handler and filter is
elegant solution.
2. Write request input and output filters (the problem here is - access to
URL and headers of request and response)
3. WRite connection input and output filters (the problem here is - subrequest.
I need to know user name during the modification process. To discover the user
name I need to issue subrequest. If I had request_rec in hands that the issueing
subrequest wouldn't be a problem. But how do I do it in connection filter ?)

So, if you were so kind to express your ideas I whould highly appreciate it.


Thanks in advance,

Yuriy







_________________________________________________________________
The new MSN 8 is here: Try it free* for 2 months http://join.msn.com/?page=dept/dialup

Reply via email to