Sorry, I don't have an environment set up to create a patch, but I found an
error in the isAccepted() method.  It currently looks like:

/**
 * Checks if name of Cookie match {@link #acceptedPattern}
 *
 * @param name of Cookie
 * @return true|false
 */
protected boolean isAccepted(String name) {
    boolean matches = acceptedPattern.matcher(name).matches();
    if (matches) {
        if (LOG.isTraceEnabled()) {
            LOG.trace("Cookie [#0] matches acceptedPattern [#1]",
name, ACCEPTED_PATTERN);
        }
    } else {
        if (LOG.isTraceEnabled()) {
            LOG.trace("Cookie [#0] doesn't match acceptedPattern
[#1]", name, ACCEPTED_PATTERN);
        }
    }
    return matches;
}


But it would be more useful if it actually reported the RegEx being used
instead of the default.  So something more like:

/**
 * Checks if name of Cookie match {@link #acceptedPattern}
 *
 * @param name of Cookie
 * @return true|false
 */
protected boolean isAccepted (String name) {
  boolean matches = acceptedPattern.matcher(name).matches();
  if(matches) {
    if(LOG.isTraceEnabled()) {
      LOG.trace("Cookie [#0] matches acceptedPattern
[#1]",name,acceptedPattern.pattern());
    }
  } else {
    if(LOG.isTraceEnabled()) {
      LOG.trace("Cookie [#0] doesn't match acceptedPattern
[#1]",name,acceptedPattern.pattern());
    }
  }
  return matches;
}

  (*Chris*)

Reply via email to