Merge remote-tracking branch 'origin/pr/1287'

This commit is contained in:
Andrew DeMaria
2019-11-03 17:11:00 -07:00
6 changed files with 5 additions and 67 deletions
@@ -214,14 +214,6 @@ public class Application extends SpringBootServletInitializer implements Embedde
LOG.warn("An error happened while trying to optimize tomcat", e);
}
try {
Class<?> jettyESCF = Class.forName("org.springframework.boot.context.embedded.jetty.JettyEmbeddedServletContainerFactory");
if (jettyESCF.isInstance(container)) {
LOG.warn("Detected Jetty web server. Here there be dragons.");
}
} catch (NoClassDefFoundError | ClassNotFoundException e) {
LOG.debug("No jetty classes found");
}
}
public static void main(String[] args) {
@@ -258,9 +258,7 @@ public class StreamController {
// This happens often and outside of the control of the server, so
// we catch Tomcat/Jetty "connection aborted by client" exceptions
// and display a short error message.
boolean shouldCatch = false;
shouldCatch |= Util.isInstanceOfClassName(e, "org.apache.catalina.connector.ClientAbortException");
shouldCatch |= Util.isInstanceOfClassName(e, "org.eclipse.jetty.io.EofException");
boolean shouldCatch = Util.isInstanceOfClassName(e, "org.apache.catalina.connector.ClientAbortException");
if (shouldCatch) {
LOG.info("{}: Client unexpectedly closed connection while loading {} ({})",
request.getRemoteAddr(),
@@ -21,9 +21,7 @@ public class LoggingExceptionResolver implements HandlerExceptionResolver, Order
// This happens often and outside of the control of the server, so
// we catch Tomcat/Jetty "connection aborted by client" exceptions
// and display a short error message.
boolean shouldCatch = false;
shouldCatch |= Util.isInstanceOfClassName(e, "org.apache.catalina.connector.ClientAbortException");
shouldCatch |= Util.isInstanceOfClassName(e, "org.eclipse.jetty.io.EofException");
boolean shouldCatch = Util.isInstanceOfClassName(e, "org.apache.catalina.connector.ClientAbortException");
if (shouldCatch) {
LOG.info("{}: Client unexpectedly closed connection while loading {} ({})", request.getRemoteAddr(), Util.getAnonymizedURLForRequest(request), e.getCause().toString());
return null;