code: private boolean isHtmlAcceptable(HttpServletRequest request)
  	{
  		@SuppressWarnings("unchecked") final List<String> accepts = ListUtility.list(ListUtility.iterate(request.getHeaders(
  				HttpHeaderNames.ACCEPT)));
  
  		for (String accept : accepts)
  		{
  			if (StringUtils.startsWithIgnoreCase(accept, "text/html"))
  				return true;
  		}
  
  		return false;
  	}
docs: Decides if an HTML response is acceptable to the client
  
  @param request
  
  @return