Fixes #3526 - Request locale not retained in WebsocketUpgrade request.

Trivial fix, the locale was not copied from the HTTP requets to the
WebSocket upgrade request.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
This commit is contained in:
Simone Bordet 2019-04-05 17:50:41 +02:00
parent 1ef851523f
commit 1b384329ae
1 changed files with 6 additions and 0 deletions

View File

@ -123,6 +123,12 @@ public class UpgradeHttpServletRequest implements HttpServletRequest
attributes.put(name, httpRequest.getAttribute(name)); attributes.put(name, httpRequest.getAttribute(name));
} }
Enumeration<Locale> localeElements = httpRequest.getLocales();
while (localeElements.hasMoreElements())
{
locales.add(localeElements.nextElement());
}
localAddress = InetSocketAddress.createUnresolved(httpRequest.getLocalAddr(), httpRequest.getLocalPort()); localAddress = InetSocketAddress.createUnresolved(httpRequest.getLocalAddr(), httpRequest.getLocalPort());
localName = httpRequest.getLocalName(); localName = httpRequest.getLocalName();
remoteAddress = InetSocketAddress.createUnresolved(httpRequest.getRemoteAddr(), httpRequest.getRemotePort()); remoteAddress = InetSocketAddress.createUnresolved(httpRequest.getRemoteAddr(), httpRequest.getRemotePort());