/** * Add user-agent for which gzip compression didn't works The user agent * String given will be exactly matched to the user-agent header submitted * by the client. * * @param userAgent * user-agent string */ public void addNoCompressionUserAgent(String userAgent) { try { Pattern nRule = Pattern.compile(userAgent); noCompressionUserAgents = addREArray(noCompressionUserAgents, nRule); } catch (PatternSyntaxException pse) { CoyoteLogger.HTTP_LOGGER.errorParsingRegexp(userAgent, pse); } }
/** * Add restricted user-agent (which will downgrade the connector to HTTP/1.0 * mode). The user agent String given will be matched via regexp to the * user-agent header submitted by the client. * * @param userAgent * user-agent string */ public void addRestrictedUserAgent(String userAgent) { try { Pattern nRule = Pattern.compile(userAgent); restrictedUserAgents = addREArray(restrictedUserAgents, nRule); } catch (PatternSyntaxException pse) { CoyoteLogger.HTTP_LOGGER.errorParsingRegexp(userAgent, pse); } }