}
@Override
public void doFilter(final HttpServletRequest request, final HttpServletResponse response, final FilterChain chain) throws IOException, ServletException {
if (this.isDebugEnabled(request)) {
CachedHttpServletResponse debugResponse = new CachedHttpServletResponse(response);
chain.doFilter(request, debugResponse);
byte[] responseBytes = debugResponse.getBytes();
String responseText = this.getResponseText(responseBytes);
RockFrameworkLogger.getLogger().warn(responseText);
response.getOutputStream().write(responseBytes);
} else {
chain.doFilter(request, response);