You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by re...@apache.org on 2022/04/19 17:27:26 UTC
[wicket] branch master updated: [WICKET-6974] return correct context path
This is an automated email from the ASF dual-hosted git repository.
reiern70 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/wicket.git
The following commit(s) were added to refs/heads/master by this push:
new c6d18e697b [WICKET-6974] return correct context path
c6d18e697b is described below
commit c6d18e697b699723ca2cc3788e64b56f5929445e
Author: reiern70 <re...@gmail.com>
AuthorDate: Sun Apr 17 09:21:08 2022 -0500
[WICKET-6974] return correct context path
---
.../org/apache/wicket/protocol/ws/javax/JavaxUpgradeHttpRequest.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/wicket-native-websocket/wicket-native-websocket-javax/src/main/java/org/apache/wicket/protocol/ws/javax/JavaxUpgradeHttpRequest.java b/wicket-native-websocket/wicket-native-websocket-javax/src/main/java/org/apache/wicket/protocol/ws/javax/JavaxUpgradeHttpRequest.java
index 10d1b2cd30..581818d23a 100644
--- a/wicket-native-websocket/wicket-native-websocket-javax/src/main/java/org/apache/wicket/protocol/ws/javax/JavaxUpgradeHttpRequest.java
+++ b/wicket-native-websocket/wicket-native-websocket-javax/src/main/java/org/apache/wicket/protocol/ws/javax/JavaxUpgradeHttpRequest.java
@@ -60,6 +60,7 @@ public class JavaxUpgradeHttpRequest implements HttpServletRequest
private final String requestUri;
private final Map<String, String[]> parametersMap;
private final Map<String, List<String>> headers;
+ private final String contextPath;
public JavaxUpgradeHttpRequest(final Session session, EndpointConfig endpointConfig)
{
@@ -77,6 +78,7 @@ public class JavaxUpgradeHttpRequest implements HttpServletRequest
this.userPrincipal = session.getUserPrincipal();
Object requestURI = session.getRequestURI();
this.requestUri = requestURI != null ? requestURI.toString() : "";
+ this.contextPath = httpSession.getServletContext().getContextPath();
this.parametersMap = new HashMap<>();
@@ -212,7 +214,7 @@ public class JavaxUpgradeHttpRequest implements HttpServletRequest
@Override
public String getContextPath()
{
- return "";
+ return contextPath;
}
@Override