You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by n....@lombardodier.com on 2012/12/21 17:21:47 UTC

[users@httpd] OutputFilter redirecting reply for modification

Hi,

Is there an existing module that can be used as an output filter to send 
the response to another web server to get the final response to send back 
to the client.

Here is a complete explanation of what I need to achieve:

1. The client sends a request.
2. The request is forwarded to another server using mod_proxy (this is 
already configured and working),
3. mod_proxy walks through the output filters to send the response back.

Here comes what I want to achieve.

4. The output filter intercepts the respons and if the type of the 
document is PDF for exemple, it sends it to another server for filtering.
5. It gets back the respons from this other server
6. It sends back to the client the response of this second server instead 
of the original response returned by mod_proxy.

If the file does not need to be filtered (not PDF in my exemple), then the 
output filter does not send it to the other server for filtering, but 
sends
it back directly with no modification to the client.

Is there such a module?

If not, what would be the best strategy to implement such a module?

Should my custom module re-use functionality from mod_proxy by linking 
with it?

Or should it use another module or Apache native APIs to forward the 
response to the other server for filtering?

Thank you very much for your help and advice on this issue !


Nicolas Weidmann
Lombard Odier & Cie
T +41 22 709 2317 - F +41 22 709 3782
www.lombardodier.com


************************ DISCLAIMER ************************
This message is intended only for use by the person to
whom it is addressed. It may contain information that is
privileged and confidential. Its content does not
constitute a formal commitment by Lombard Odier & Cie
or any of its branches or affiliates.
If you are not the intended recipient of this message,
kindly notify the sender immediately and destroy this
message. Thank You.
*****************************************************************

Re: [users@httpd] OutputFilter redirecting reply for modification

Posted by n....@lombardodier.com.
Daniel,

Thank you for your help !

Happy New Year !


Nicolas Weidmann
Lombard Odier & Cie
T +41 22 709 2317 - F +41 22 709 3782
www.lombardodier.com




From:   Daniel Gruno <ru...@cord.dk>
To:     users@httpd.apache.org, 
Date:   21.12.2012 20:11
Subject:        Re: [users@httpd] OutputFilter redirecting reply for 
modification



On 12/21/2012 05:21 PM, n.weidmann@lombardodier.com wrote:
> Hi,
> 
> Is there an existing module that can be used as an output filter to send
> the response to another web server to get the final response to send
> back to the client.
...
> Here comes what I want to achieve.
> 
> 4. The output filter intercepts the respons and if the type of the
> document is PDF for exemple, it sends it to another server for 
filtering.
> 5. It gets back the respons from this other server
> 6. It sends back to the client the response of this second server
> instead of the original response returned by mod_proxy.
> 
> If the file does not need to be filtered (not PDF in my exemple), then
> the output filter does not send it to the other server for filtering,
> but sends
> it back directly with no modification to the client.
> 
> Is there such a module?
> 

Yes, two options spring to mind; mod_lua from trunk or mod_ext_filter.
If you're not comfortable using trunk builds, mod_ext_filter is the best
way to go. For more info on this module, please visit
http://httpd.apache.org/docs/2.4/mod/mod_ext_filter.html

With regards,
Daniel.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org




************************ DISCLAIMER ************************
This message is intended only for use by the person to
whom it is addressed. It may contain information that is
privileged and confidential. Its content does not
constitute a formal commitment by Lombard Odier & Cie
or any of its branches or affiliates.
If you are not the intended recipient of this message,
kindly notify the sender immediately and destroy this
message. Thank You.
*****************************************************************

Re: [users@httpd] OutputFilter redirecting reply for modification

Posted by Daniel Gruno <ru...@cord.dk>.
On 12/21/2012 05:21 PM, n.weidmann@lombardodier.com wrote:
> Hi,
> 
> Is there an existing module that can be used as an output filter to send
> the response to another web server to get the final response to send
> back to the client.
...
> Here comes what I want to achieve.
> 
> 4. The output filter intercepts the respons and if the type of the
> document is PDF for exemple, it sends it to another server for filtering.
> 5. It gets back the respons from this other server
> 6. It sends back to the client the response of this second server
> instead of the original response returned by mod_proxy.
> 
> If the file does not need to be filtered (not PDF in my exemple), then
> the output filter does not send it to the other server for filtering,
> but sends
> it back directly with no modification to the client.
> 
> Is there such a module?
> 

Yes, two options spring to mind; mod_lua from trunk or mod_ext_filter.
If you're not comfortable using trunk builds, mod_ext_filter is the best
way to go. For more info on this module, please visit
http://httpd.apache.org/docs/2.4/mod/mod_ext_filter.html

With regards,
Daniel.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org