Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jetty-dev] ProxyServlet customizeExchange : add parameter response ?

Hi,

I'm trying to build a http transparent proxy, similar to what you get with Apache mod_proxy, ProxyPass and ProxyPassReverse. So I need to intercept response headers sent by the back-end server ( Location, Content-Location and URI).

I have a servlet which extends ProxyServlet.Transparent and overrides method customizeExchange :

@Override
protected void customizeExchange(HttpExchange exchange, HttpServletRequest request)
{
exchange.setEventListener(new ProxyEventListener(exchange.getEventListener(), request));
}

Here I miss a reference to the HttpServletResponse instance. I'd like to have :

@Override
protected void customizeExchange(HttpExchange exchange, HttpServletRequest request, HttpServletResponse response)
{
exchange.setEventListener(new ProxyEventListener(exchange.getEventListener(), request, response));
}

Would you accept a patch like this ? Or do you think there's another way to do the job ?

Thanks


Back to the top