Merged branch 'jetty-9.2.x' into 'master'.

This commit is contained in:
Simone Bordet 2015-01-29 17:10:10 +01:00
commit 7d7fba4948
1 changed files with 3 additions and 0 deletions

View File

@ -392,6 +392,9 @@ public abstract class AbstractProxyServlet extends HttpServlet
protected void copyHeaders(HttpServletRequest clientRequest, Request proxyRequest) protected void copyHeaders(HttpServletRequest clientRequest, Request proxyRequest)
{ {
// First clear possibly existing headers, as we are going to copy those from the client request.
proxyRequest.getHeaders().clear();
Set<String> headersToRemove = findConnectionHeaders(clientRequest); Set<String> headersToRemove = findConnectionHeaders(clientRequest);
for (Enumeration<String> headerNames = clientRequest.getHeaderNames(); headerNames.hasMoreElements();) for (Enumeration<String> headerNames = clientRequest.getHeaderNames(); headerNames.hasMoreElements();)