martin-g commented on code in PR #1223:
URL: https://github.com/apache/wicket/pull/1223#discussion_r2267947463


##########
wicket-native-websocket/wicket-native-websocket-javax/src/main/java/org/apache/wicket/protocol/ws/javax/JavaxUpgradeHttpRequest.java:
##########
@@ -75,14 +81,21 @@ public JavaxUpgradeHttpRequest(final Session session, 
EndpointConfig endpointCon
                        userProperties = endpointConfig.getUserProperties();
                }
 
-               this.httpSession = (HttpSession) userProperties.get("session");
-               this.headers = (Map<String, List<String>>) 
userProperties.get("headers");
+               this.httpSession = (HttpSession) userProperties.get(SESSION);
+               this.headers = (Map<String, List<String>>) 
userProperties.get(HEADERS);
                this.queryString = session.getQueryString();
                this.userPrincipal = session.getUserPrincipal();
                Object requestURI = session.getRequestURI();
                this.requestUri = requestURI != null ? requestURI.toString() : 
"";
-               this.contextPath = 
httpSession.getServletContext().getContextPath();
-
+               if (httpSession == null)
+               {
+                       this.contextPath = "/";

Review Comment:
   I am not sure either. It should be OK.



##########
wicket-native-websocket/wicket-native-websocket-javax/src/main/java/org/apache/wicket/protocol/ws/javax/WicketServerEndpointConfig.java:
##########
@@ -131,14 +131,16 @@ public void modifyHandshake(ServerEndpointConfig sec, 
HandshakeRequest request,
                        LOG.trace("httpSession: {}", httpSession);
                        if (httpSession != null)
                        {
-                               userProperties.put("session", httpSession);
+                               
userProperties.put(JavaxUpgradeHttpRequest.SESSION, httpSession);
+                       } else {
+                               sec.getPath();

Review Comment:
   This seems unused 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to