In a reverse proxy scenario, I want to do the following 1) read incoming request A and keep it on hold 2) set up connection to backend for (new) request B 3) send request B and read response over that backend connection 4) "bind" that backend connection to request A so that mod_proxy will use that connection when sending request A. No other request is to use that backend connection, so prevent mod_proxy from reusing that backend connection for any request other then request A (and it's sub requests)
I'm done with steps 1 to 3 but the last one is somewhat tricky. My current plan is to patch mod_proxy_http.c so it will only set up a new backend connection for a request if it cannot find an existing one in some table (probably use some module config to get that data across). But this plan lacks a part of step 4) which is to prevent any other request from using that backend connection. Is there a 'built-in' way to do this ? If there is none, what would be the pitfalls I should watch out for when writing a patch for that specific part of mod_proxy ? Cheers, Thomas