httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yuriy Pasichnyk" <>
Subject Need your advice about proper design of input and output filters
Date Sun, 19 Jan 2003 13:33:00 GMT
Dear Sirs,

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

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 
   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) 
   will intercept and modify a request, but I cannot use anything like that 
   modifying response (as I understand for that matter I have to use filters 
   unless content handler is mod_perl perl handler that is written with 
   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 - 
   I need to know user name during the modification process. To discover the 
   name I need to issue subrequest. If I had request_rec in hands that the 
   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,


The new MSN 8 is here: Try it free* for 2 months

View raw message