Package com.xebialabs.deployit.jetty
Class FlexRestCompatibilityFilter
- java.lang.Object
-
- com.xebialabs.deployit.jetty.FlexRestCompatibilityFilter
-
- All Implemented Interfaces:
javax.servlet.Filter
public class FlexRestCompatibilityFilter extends java.lang.Object implements javax.servlet.FilterFilter that makes Rest compatible with the broken Flex implementation - Return 20X status regardless of what the status was, original status stored in X-Original-Status Header -
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.StringX_FLEX_RESTstatic java.lang.StringX_METHOD_OVERRIDE_HEADERstatic java.lang.StringX_ORIGINAL_STATUS_HEADER
-
Constructor Summary
Constructors Constructor Description FlexRestCompatibilityFilter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddestroy()voiddoFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain)voidinit(javax.servlet.FilterConfig filterConfig)
-
-
-
Field Detail
-
X_FLEX_REST
protected static final java.lang.String X_FLEX_REST
- See Also:
- Constant Field Values
-
X_ORIGINAL_STATUS_HEADER
public static final java.lang.String X_ORIGINAL_STATUS_HEADER
- See Also:
- Constant Field Values
-
X_METHOD_OVERRIDE_HEADER
public static final java.lang.String X_METHOD_OVERRIDE_HEADER
- See Also:
- Constant Field Values
-
-
Method Detail
-
init
public void init(javax.servlet.FilterConfig filterConfig) throws javax.servlet.ServletException- Specified by:
initin interfacejavax.servlet.Filter- Throws:
javax.servlet.ServletException
-
doFilter
public void doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain) throws java.io.IOException, javax.servlet.ServletException- Specified by:
doFilterin interfacejavax.servlet.Filter- Throws:
java.io.IOExceptionjavax.servlet.ServletException
-
destroy
public void destroy()
- Specified by:
destroyin interfacejavax.servlet.Filter
-
-