public class ContentLengthFilter extends Object implements javax.servlet.Filter
| Modifier and Type | Class and Description |
|---|---|
private static class |
ContentLengthFilter.LimitedContentLengthRequest |
| Modifier and Type | Field and Description |
|---|---|
private static List<String> |
BYPASS_URI_PREFIXES |
private static org.slf4j.Logger |
logger |
static int |
MAX_LENGTH_DEFAULT |
static String |
MAX_LENGTH_INIT_PARAM |
private int |
maxContentLength |
| Constructor and Description |
|---|
ContentLengthFilter() |
| Modifier and Type | Method and Description |
|---|---|
void |
destroy() |
void |
doFilter(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
javax.servlet.FilterChain chain) |
private static String |
formatSize(int byteSize)
Formats a value like
1048576 to 1 MB for easier human consumption. |
int |
getMaxContentLength()
Returns the currently configured max content length in bytes.
|
void |
init() |
void |
init(javax.servlet.FilterConfig config) |
private boolean |
isSubjectToFilter(javax.servlet.http.HttpServletRequest request)
Returns
true if this request is subject to the filter operation, false if not. |
private static final org.slf4j.Logger logger
public static final String MAX_LENGTH_INIT_PARAM
public static final int MAX_LENGTH_DEFAULT
private int maxContentLength
public void init()
public void init(javax.servlet.FilterConfig config)
throws javax.servlet.ServletException
init in interface javax.servlet.Filterjavax.servlet.ServletExceptionpublic void doFilter(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
javax.servlet.FilterChain chain)
throws IOException,
javax.servlet.ServletException
doFilter in interface javax.servlet.FilterIOExceptionjavax.servlet.ServletExceptionpublic void destroy()
destroy in interface javax.servlet.Filterpublic int getMaxContentLength()
private boolean isSubjectToFilter(javax.servlet.http.HttpServletRequest request)
true if this request is subject to the filter operation, false if not.request - the incoming requestprivate static String formatSize(int byteSize)
1048576 to 1 MB for easier human consumption.byteSize - the size in bytesCopyright © 2023 Apache NiFi Project. All rights reserved.