Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimone Bordet2015-12-08 07:02:20 -0500
committerSimone Bordet2015-12-08 07:02:20 -0500
commit9c673e542d7500b8fbd3820da7ee965d9fc22b2f (patch)
tree517a72ccdddee41930c372e006290b1c66cd5ff5 /jetty-websocket
parentb9c15355520f1c0db9ddf4fa0d237b68269438b5 (diff)
parente6f23a692ec3a7472965100854a7ade69733c71c (diff)
downloadorg.eclipse.jetty.project-9c673e542d7500b8fbd3820da7ee965d9fc22b2f.tar.gz
org.eclipse.jetty.project-9c673e542d7500b8fbd3820da7ee965d9fc22b2f.tar.xz
org.eclipse.jetty.project-9c673e542d7500b8fbd3820da7ee965d9fc22b2f.zip
Merged branch 'jetty-9.2.x' into 'jetty-9.3.x'.
Diffstat (limited to 'jetty-websocket')
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/server/JsrCreator.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/jetty-websocket/javax-websocket-server-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/server/JsrCreator.java b/jetty-websocket/javax-websocket-server-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/server/JsrCreator.java
index c2f95755de..60016f4d1d 100644
--- a/jetty-websocket/javax-websocket-server-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/server/JsrCreator.java
+++ b/jetty-websocket/javax-websocket-server-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/server/JsrCreator.java
@@ -20,7 +20,9 @@ package org.eclipse.jetty.websocket.jsr356.server;
import java.io.IOException;
import java.util.ArrayList;
+import java.util.Collections;
import java.util.List;
+import java.util.Map;
import javax.websocket.Extension;
import javax.websocket.Extension.Parameter;
@@ -45,6 +47,7 @@ public class JsrCreator implements WebSocketCreator
{
public static final String PROP_REMOTE_ADDRESS = "javax.websocket.endpoint.remoteAddress";
public static final String PROP_LOCAL_ADDRESS = "javax.websocket.endpoint.localAddress";
+ public static final String PROP_LOCALES = "javax.websocket.upgrade.locales";
private static final Logger LOG = Log.getLogger(JsrCreator.class);
private final WebSocketContainerScope containerScope;
private final ServerEndpointMetadata metadata;
@@ -74,8 +77,10 @@ public class JsrCreator implements WebSocketCreator
// This is being implemented as an optional set of userProperties so that
// it is not JSR api breaking. A few users on #jetty and a few from cometd
// have asked for access to this information.
- config.getUserProperties().put(PROP_LOCAL_ADDRESS,req.getLocalSocketAddress());
- config.getUserProperties().put(PROP_REMOTE_ADDRESS,req.getRemoteSocketAddress());
+ Map<String, Object> userProperties = config.getUserProperties();
+ userProperties.put(PROP_LOCAL_ADDRESS,req.getLocalSocketAddress());
+ userProperties.put(PROP_REMOTE_ADDRESS,req.getRemoteSocketAddress());
+ userProperties.put(PROP_LOCALES,Collections.list(req.getLocales()));
// Get Configurator from config object (not guaranteed to be unique per endpoint upgrade)
ServerEndpointConfig.Configurator configurator = config.getConfigurator();

Back to the top