Skip to content

Commit

Permalink
MYFACES-4696: 5.0 Undertow connection abort handling (#814)
Browse files Browse the repository at this point in the history
  • Loading branch information
melloware authored Dec 18, 2024
1 parent 3251378 commit f226c67
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,7 @@ libraryName, isAllowSlashesLibraryName()))
}
}
}
catch (IOException e)
catch (Exception e)
{
if (isConnectionAbort(e))
{
Expand All @@ -635,10 +635,12 @@ libraryName, isAllowSlashesLibraryName()))
}
}

private static boolean isConnectionAbort(IOException e)
private static boolean isConnectionAbort(Exception e)
{
return e.getClass().getCanonicalName().equals("org.apache.catalina.connector.ClientAbortException")
|| e.getClass().getCanonicalName().equals("org.eclipse.jetty.io.EofException");
String exceptionName = e.getClass().getCanonicalName();
return "org.apache.catalina.connector.ClientAbortException".equals(exceptionName) // Tomcat
|| "org.eclipse.jetty.io.EofException".equals(exceptionName) // Jetty
|| (e instanceof IllegalStateException && e.getMessage().contains("UT000127")); // Undertow
}

/**
Expand Down

0 comments on commit f226c67

Please sign in to comment.