Package io.dropwizard.jetty
Class ZipExceptionHandlingServletFilter
java.lang.Object
io.dropwizard.jetty.ZipExceptionHandlingServletFilter
- All Implemented Interfaces:
jakarta.servlet.Filter
This
Filter implementation catches ZipExceptions and EOFExceptions to properly return an HTTP
status code 400 instead of 500 for malformed GZIP input.
For this Filter to work, a ZipExceptionHandlingGzipHandler must be present in the handler chain.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddoFilter(jakarta.servlet.ServletRequest request, jakarta.servlet.ServletResponse response, jakarta.servlet.FilterChain chain) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface jakarta.servlet.Filter
destroy, init
-
Constructor Details
-
ZipExceptionHandlingServletFilter
public ZipExceptionHandlingServletFilter()
-
-
Method Details
-
doFilter
public void doFilter(jakarta.servlet.ServletRequest request, jakarta.servlet.ServletResponse response, jakarta.servlet.FilterChain chain) throws IOException, jakarta.servlet.ServletException - Specified by:
doFilterin interfacejakarta.servlet.Filter- Throws:
IOExceptionjakarta.servlet.ServletException
-