Author: jleroux
Date: Mon Aug 26 05:58:44 2019
New Revision: 1865902
URL:
http://svn.apache.org/viewvc?rev=1865902&view=revLog:
Improved: Give nested requests related with checkLogin a propper Error-Message
in log
(OFBIZ-11154)
An error appears in log due to the nested request that can not be resolved
properly.
We should not worry about nested requests, they continue to work, and we should
simply not show an error message from RequestHandler in case of nested request.
Thanks: Initialy spotted by Benjamin Jugl in OFBIZ-9379
Modified:
ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/RequestHandler.java
Modified: ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/RequestHandler.java
URL:
http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/RequestHandler.java?rev=1865902&r1=1865901&r2=1865902&view=diff==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/RequestHandler.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/RequestHandler.java Mon Aug 26 05:58:44 2019
@@ -274,9 +274,14 @@ public class RequestHandler {
Collection<RequestMap> rmaps = resolveURI(ccfg, request);
if (rmaps.isEmpty()) {
if (throwRequestHandlerExceptionOnMissingLocalRequest) {
- throw new RequestHandlerException(requestMissingErrorMessage);
+ if (path.contains("/checkLogin/")) {
+ // Nested requests related with checkLogin uselessly clutter the log. There is nothing to worry about, better remove this wrong error message.
+ return;
+ } else {
+ throw new RequestHandlerException(requestMissingErrorMessage);
+ }
} else {
- throw new RequestHandlerExceptionAllowExternalRequests();
+ throw new RequestHandlerExceptionAllowExternalRequests();
}
}