-
Improvement
-
Resolution: Unresolved
-
Neutral
-
None
-
None
-
None
On Tomcat 9 broken pipe exceptions are (often? always?) thrown without setting partial content response code. Proposed patch fixes this.
Subject: [PATCH] tomcat class patch --- Index: info/magnolia/dam/core/download/DamDownloadServlet.java IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/info/magnolia/dam/core/download/DamDownloadServlet.java b/info/magnolia/dam/core/download/DamDownloadServlet.java --- a/info/magnolia/dam/core/download/DamDownloadServlet.java (revision 06fa5448169640aa8d4471a3c994784e47ee3ed7) +++ b/info/magnolia/dam/core/download/DamDownloadServlet.java (revision fd24dd353346cde6951828db43f71a02e1538959) @@ -78,6 +78,8 @@ public class DamDownloadServlet extends HttpServlet implements SelfMappingServlet { private static final Logger log = LoggerFactory.getLogger(DamDownloadServlet.class); + private static final String CLIENT_ABORT_CLASS = "org.apache.catalina.connector.ClientAbortException"; + static final String CONTENT_DISPOSITION = "Content-Disposition"; static final String LAST_MODIFIED = "Last-Modified"; @@ -194,7 +196,8 @@ } // re-throw exception only if it's not a partial content response, else logs would fill up with (harmless) // broken pipe exceptions on some app servers (e.g. Tomcat) - if (res.getStatus() != HttpServletResponse.SC_PARTIAL_CONTENT) { + if (res.getStatus() != HttpServletResponse.SC_PARTIAL_CONTENT && + !CLIENT_ABORT_CLASS.equals(e.getClass().getName())) { throw e; } } finally {
Acceptance criteria
1.
|
Implementation | To Do | Unassigned | |
2.
|
Review | To Do | Unassigned | |
3.
|
Pre-Integration QA | To Do | Unassigned | |
4.
|
QA | To Do | Unassigned |