From e2ccb6ce9d60bf348e76c20490d52452daaf7c9b Mon Sep 17 00:00:00 2001 From: reger Date: Sat, 4 Jan 2014 20:49:26 +0100 Subject: [PATCH] modified DefaultServlet parameter on invoke templates call response with post=0 (if post empty) simulating previous behavior. (template servlets typically test for post==null, found one more Crawler.p.java were empty post caused problem, = defaults not correctly set) --- source/net/yacy/http/servlets/YaCyDefaultServlet.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/source/net/yacy/http/servlets/YaCyDefaultServlet.java b/source/net/yacy/http/servlets/YaCyDefaultServlet.java index bb6ddd146..decafa66d 100644 --- a/source/net/yacy/http/servlets/YaCyDefaultServlet.java +++ b/source/net/yacy/http/servlets/YaCyDefaultServlet.java @@ -763,7 +763,12 @@ public class YaCyDefaultServlet extends HttpServlet { // eof modification to read attribute Object tmp; try { - tmp = invokeServlet(targetClass, legacyRequestHeader, args); + if (args.isEmpty()) { + // yacy servlets typically test for args != null (but not for args .isEmpty()) + tmp = invokeServlet(targetClass, legacyRequestHeader, null); + } else { + tmp = invokeServlet(targetClass, legacyRequestHeader, args); + } } catch (InvocationTargetException e) { ConcurrentLog.logException(e); throw new ServletException();