From dcd550ec74575f77eeee0bc730fb98aa3b6acec2 Mon Sep 17 00:00:00 2001 From: Clemens von Schwerin Date: Thu, 3 Sep 2020 10:34:46 +0200 Subject: [PATCH] Update ServletPortletHelper.java (#12087) This is needed to get /UIDL working behind a reverse proxy. Without the change pathInfo would be "/UIDL" but prefix would be "/UIDL/" in line 105. --- .../src/main/java/com/vaadin/server/ServletPortletHelper.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/server/src/main/java/com/vaadin/server/ServletPortletHelper.java b/server/src/main/java/com/vaadin/server/ServletPortletHelper.java index 82ea4a9d1d..d0daff471a 100644 --- a/server/src/main/java/com/vaadin/server/ServletPortletHelper.java +++ b/server/src/main/java/com/vaadin/server/ServletPortletHelper.java @@ -98,6 +98,10 @@ public class ServletPortletHelper implements Serializable { prefix = '/' + prefix; } + if (!pathInfo.endsWith("/") && prefix.endsWith("/")) { + pathInfo += '/'; + } + if (pathInfo.startsWith(prefix)) { return true; } -- 2.39.5