code: @Override
  	public void preparePaint(final Request request) {
  		if (doTransform && request instanceof ServletRequest) {
  			HttpServletRequest httpServletRequest = ((ServletRequest) request).getBackingRequest();
  			String userAgentString = httpServletRequest.getHeader("User-Agent");
  			/* It is possible to opt out on a case by case basis by setting a flag on the ua string.
  			 * This helps custom user agents that do not support HTML as well as facilitating debugging.
  			 */
  			if (userAgentString != null && userAgentString.contains(NO_XSLT_FLAG)) {
  				doTransform = false;
  			}
  			String debugCookie = ServletUtil.extractCookie(httpServletRequest, DEBUG_REQUEST);
  			if ("true".equals(debugCookie)) {
  				debugRequested = true;
  			}
  		}
  		super.preparePaint(request);
  	}
docs: Override preparePaint in order to perform processing specific to this interceptor.
  
  @param request the request being responded to.