Fix context removal
authorMathieu Baudier <mbaudier@argeo.org>
Thu, 14 Sep 2023 06:10:17 +0000 (08:10 +0200)
committerMathieu Baudier <mbaudier@argeo.org>
Thu, 14 Sep 2023 06:10:17 +0000 (08:10 +0200)
org.argeo.cms.lib.jetty/src/org/argeo/cms/jetty/JettyHttpServer.java

index e994463f9606e00d530efef01af0c184b37ad684..a469a87c4ec8b22ca4b1f7a0dafc095502f613de 100644 (file)
@@ -259,6 +259,8 @@ public class JettyHttpServer extends HttpsServer {
 
        @Override
        public synchronized void removeContext(String path) throws IllegalArgumentException {
+               if (!path.endsWith("/"))
+                       path = path + "/";
                if (!contexts.containsKey(path))
                        throw new IllegalArgumentException("Context " + path + " does not exist");
                JettyHttpContext httpContext = contexts.remove(path);