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/17 14:21:18 UTC

[wicket] branch bugfix/reiern70/WICKET-6974 created (now 7a33a4ae40)

This is an automated email from the ASF dual-hosted git repository.

reiern70 pushed a change to branch bugfix/reiern70/WICKET-6974
in repository https://gitbox.apache.org/repos/asf/wicket.git


      at 7a33a4ae40 [WICKET-6974] return correct context path

This branch includes the following new commits:

     new 7a33a4ae40 [WICKET-6974] return correct context path

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[wicket] 01/01: [WICKET-6974] return correct context path

Posted by re...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

reiern70 pushed a commit to branch bugfix/reiern70/WICKET-6974
in repository https://gitbox.apache.org/repos/asf/wicket.git

commit 7a33a4ae40f0503827a20b4f3d20252b86d05f96
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 f1f58b9466..306da62385 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