incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fmesc...@apache.org
Subject svn commit: r1586411 - /sling/trunk/bundles/engine/src/main/java/org/apache/sling/engine/impl/SlingMainServlet.java
Date Thu, 10 Apr 2014 18:48:56 GMT
Author: fmeschbe
Date: Thu Apr 10 18:48:56 2014
New Revision: 1586411

URL: http://svn.apache.org/r1586411
Log:
SLING-3498 Simply log IOException in the service method at DEBUG level
  since we might not have a SocketException at all for this case.

Modified:
    sling/trunk/bundles/engine/src/main/java/org/apache/sling/engine/impl/SlingMainServlet.java

Modified: sling/trunk/bundles/engine/src/main/java/org/apache/sling/engine/impl/SlingMainServlet.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/engine/src/main/java/org/apache/sling/engine/impl/SlingMainServlet.java?rev=1586411&r1=1586410&r2=1586411&view=diff
==============================================================================
--- sling/trunk/bundles/engine/src/main/java/org/apache/sling/engine/impl/SlingMainServlet.java
(original)
+++ sling/trunk/bundles/engine/src/main/java/org/apache/sling/engine/impl/SlingMainServlet.java
Thu Apr 10 18:48:56 2014
@@ -19,7 +19,6 @@
 package org.apache.sling.engine.impl;
 
 import java.io.IOException;
-import java.net.SocketException;
 import java.util.ArrayList;
 import java.util.Dictionary;
 import java.util.Enumeration;
@@ -208,30 +207,11 @@ public class SlingMainServlet extends Ge
 
             } catch (IOException ioe) {
 
-                // unwrap any causes (Jetty wraps SocketException in
-                // EofException)
-                Throwable cause = ioe;
-                while (cause.getCause() != null) {
-                    cause = cause.getCause();
-                }
-
-                if (cause instanceof SocketException) {
-
-                    // if the cause is a SocketException, the client most
-                    // probably
-                    // aborted the request, we do not fill the log with errors
-                    // in this case
-                    log.debug(
-                        "service: Socketexception (Client abort or network problem",
-                        ioe);
-
-                } else {
-
-                    // otherwise we want to know why the servlet failed
-                    log.error(
-                        "service: Uncaught IO Problem while handling the request",
-                        ioe);
-                }
+                // SLING-3498: Jetty with NIO does not have a wrapped
+                // SocketException any longer but a plain IOException
+                // from the NIO Socket channel. Hence we don't care for
+                // unwrapping and just log at DEBUG level
+                log.debug("service: Probably client aborted request or any other network
problem", ioe);
 
             } catch (Throwable t) {
 



Mime
View raw message