This is an automated email from the ASF dual-hosted git repository.
hansva pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/hop.git
The following commit(s) were added to refs/heads/main by this push:
new d6b732a6e2 Fix 301 redirect issue in WebServiceServlet causing request
body loss (#6899)
d6b732a6e2 is described below
commit d6b732a6e26ecf36d9bd5097896137bc0b6cd1bc
Author: Lance <[email protected]>
AuthorDate: Mon Mar 30 13:47:52 2026 +0800
Fix 301 redirect issue in WebServiceServlet causing request body loss
(#6899)
Signed-off-by: lance <[email protected]>
---
engine/src/main/java/org/apache/hop/www/WebServer.java | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/engine/src/main/java/org/apache/hop/www/WebServer.java
b/engine/src/main/java/org/apache/hop/www/WebServer.java
index 273f0907ea..f55a409c5c 100644
--- a/engine/src/main/java/org/apache/hop/www/WebServer.java
+++ b/engine/src/main/java/org/apache/hop/www/WebServer.java
@@ -282,6 +282,10 @@ public class WebServer {
ServletContextHandler servletContext =
new ServletContextHandler(getContextPath(servlet),
ServletContextHandler.SESSIONS);
+ // Without this setting, Jetty may issue a 301 redirect when the request
URL
+ // does not exactly match the servlet context path (e.g. missing
trailing "/")
+ // servlet as /hop/foo -> /hop/foo/ (see Jetty
ContextHandler#setAllowNullPathInContext).
+ servletContext.setAllowNullPathInContext(true);
contexts.addHandler(servletContext);
ServletHolder servletHolder = new ServletHolder((Servlet) servlet);
servletContext.addServlet(servletHolder, "/*");