Added serverResponse parameter to filterServerResponseHeader().

This commit is contained in:
Simone Bordet 2015-02-12 23:10:17 +01:00
parent 23e9246115
commit d788df9a57
2 changed files with 3 additions and 3 deletions

View File

@ -523,7 +523,7 @@ public abstract class AbstractProxyServlet extends HttpServlet
if (HOP_HEADERS.contains(lowerHeaderName))
continue;
String newHeaderValue = filterServerResponseHeader(clientRequest, headerName, field.getValue());
String newHeaderValue = filterServerResponseHeader(clientRequest, serverResponse, headerName, field.getValue());
if (newHeaderValue == null || newHeaderValue.trim().length() == 0)
continue;
@ -559,7 +559,7 @@ public abstract class AbstractProxyServlet extends HttpServlet
}
}
protected String filterServerResponseHeader(HttpServletRequest clientRequest, String headerName, String headerValue)
protected String filterServerResponseHeader(HttpServletRequest clientRequest, Response serverResponse, String headerName, String headerValue)
{
return headerValue;
}

View File

@ -145,7 +145,7 @@ public class ProxyServlet extends AbstractProxyServlet
// TODO: remove in Jetty 9.3, only here for backward compatibility.
@Override
protected String filterServerResponseHeader(HttpServletRequest clientRequest, String headerName, String headerValue)
protected String filterServerResponseHeader(HttpServletRequest clientRequest, Response serverResponse, String headerName, String headerValue)
{
return filterResponseHeader(clientRequest, headerName, headerValue);
}