You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by kw...@apache.org on 2015/11/08 17:44:44 UTC
svn commit: r1713246 -
/qpid/java/trunk/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/servlet/rest/AbstractServlet.java
Author: kwall
Date: Sun Nov 8 16:44:43 2015
New Revision: 1713246
URL: http://svn.apache.org/viewvc?rev=1713246&view=rev
Log:
QPID-6761: [Java Broker] Downgrade logging of org.eclipse.jetty.io.EofException to avoid reporting browser broken-pipes at ERRORs.
Modified:
qpid/java/trunk/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/servlet/rest/AbstractServlet.java
Modified: qpid/java/trunk/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/servlet/rest/AbstractServlet.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/servlet/rest/AbstractServlet.java?rev=1713246&r1=1713245&r2=1713246&view=diff
==============================================================================
--- qpid/java/trunk/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/servlet/rest/AbstractServlet.java (original)
+++ qpid/java/trunk/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/servlet/rest/AbstractServlet.java Sun Nov 8 16:44:43 2015
@@ -79,7 +79,7 @@ public abstract class AbstractServlet ex
}
@Override
- protected final void doGet(final HttpServletRequest request, final HttpServletResponse resp)
+ protected final void doGet(final HttpServletRequest request, final HttpServletResponse resp) throws ServletException, IOException
{
doWithSubjectAndActor(
new PrivilegedExceptionAction<Void>()
@@ -107,7 +107,7 @@ public abstract class AbstractServlet ex
@Override
- protected final void doPost(final HttpServletRequest request, final HttpServletResponse resp)
+ protected final void doPost(final HttpServletRequest request, final HttpServletResponse resp) throws ServletException, IOException
{
doWithSubjectAndActor(
new PrivilegedExceptionAction<Void>()
@@ -134,7 +134,7 @@ public abstract class AbstractServlet ex
}
@Override
- protected final void doPut(final HttpServletRequest request, final HttpServletResponse resp)
+ protected final void doPut(final HttpServletRequest request, final HttpServletResponse resp) throws ServletException, IOException
{
doWithSubjectAndActor(
new PrivilegedExceptionAction<Void>()
@@ -197,7 +197,7 @@ public abstract class AbstractServlet ex
private void doWithSubjectAndActor(
PrivilegedExceptionAction<Void> privilegedExceptionAction,
final HttpServletRequest request,
- final HttpServletResponse resp)
+ final HttpServletResponse resp) throws IOException
{
Subject subject;
try
@@ -221,13 +221,26 @@ public abstract class AbstractServlet ex
}
catch (PrivilegedActionException e)
{
- LOGGER.error("Unable to perform action", e);
Throwable cause = e.getCause();
+
+ // Jetty uses it EofException to signal an EOF from the peer (e.g. broken pipe etc). It arises in
+ // situations such as abnormal browser termination etc.
+ if (cause instanceof org.eclipse.jetty.io.EofException)
+ {
+ if (LOGGER.isDebugEnabled())
+ {
+ String message = cause.getCause() != null ? cause.getCause().getMessage() : cause.getMessage();
+ LOGGER.debug("IO error : {}", message);
+ }
+ throw (IOException)cause;
+ }
+
+ LOGGER.error("Unable to perform action", e);
if(cause instanceof RuntimeException)
{
throw (RuntimeException)cause;
}
- if(cause instanceof Error)
+ else if(cause instanceof Error)
{
throw (Error)cause;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org