You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by as...@apache.org on 2014/09/20 17:33:34 UTC
svn commit: r1626458 -
/ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java
Author: ashish
Date: Sat Sep 20 15:33:34 2014
New Revision: 1626458
URL: http://svn.apache.org/r1626458
Log:
Applied bug fix from jira issue - OFBIZ-254 - Noisy, Possibly Unnecessary Logging when a browser request is cancelled by the user.
Thanks Jacopo for reporting the issue and thanks Pranay for the contribution.
Modified:
ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java
Modified: ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java?rev=1626458&r1=1626457&r2=1626458&view=diff
==============================================================================
--- ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java (original)
+++ ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java Sat Sep 20 15:33:34 2014
@@ -996,14 +996,11 @@ public class RequestHandler {
try {
resp.flushBuffer();
} catch (java.io.IOException e) {
- /*If request is an ajax request and user calls abort() method for on ajax request then skip throwing of RequestHandlerException .
- Specially its done for async ajax auto completer call, if we call abort() method on ajax request then its showing broken pipe exception on console,
- because request is aborted by client (browser).*/
- if (!"XMLHttpRequest".equals(req.getHeader("X-Requested-With"))) {
- throw new RequestHandlerException("Error flushing response buffer", e);
- } else {
- if (Debug.verboseOn()) Debug.logVerbose("Skip Request Handler Exception for ajax request.", module);
- }
+ /* If any request gets aborted before completing, i.e if a user requests a page and cancels that request before the page is rendered and returned
+ or if request is an ajax request and user calls abort() method for on ajax request then its showing broken pipe exception on console,
+ skip throwing of RequestHandlerException. JIRA Ticket - OFBIZ-254
+ */
+ if (Debug.verboseOn()) Debug.logVerbose("Skip Request Handler Exception that is caused due to aborted requests. " + e.getMessage(), module);
}
String vname = (String) req.getAttribute("_CURRENT_VIEW_");