Tabnine Logo
RFC2965Spec.pathMatch
Code IndexAdd Tabnine to your IDE (free)

How to use
pathMatch
method
in
org.apache.commons.httpclient.cookie.RFC2965Spec

Best Java code snippets using org.apache.commons.httpclient.cookie.RFC2965Spec.pathMatch (Showing top 10 results out of 315)

origin: commons-httpclient/commons-httpclient

  /**
   * Match cookie path attribute. The value for the Path attribute must be a
   * prefix of the request-URI (case-sensitive matching).
   */
  public boolean match(final Cookie cookie, final CookieOrigin origin) {
    if (cookie == null) {
      throw new IllegalArgumentException("Cookie may not be null");
    }
    if (origin == null) {
      throw new IllegalArgumentException("Cookie origin may not be null");
    }
    String path = origin.getPath();
    if (cookie.getPath() == null) {
      LOG.warn("Invalid cookie state: path attribute is null.");
      return false;
    }
    if (path.trim().equals("")) {
      path = PATH_DELIM;
    }
    if (!pathMatch(path, cookie.getPath())) {
      return false;
    }
    return true;
  }
}
origin: commons-httpclient/commons-httpclient

/**
 * Validate cookie path attribute. The value for the Path attribute must be a
 * prefix of the request-URI (case-sensitive matching).
 */
public void validate(final Cookie cookie, final CookieOrigin origin)
    throws MalformedCookieException {
  if (cookie == null) {
    throw new IllegalArgumentException("Cookie may not be null");
  }
  if (origin == null) {
    throw new IllegalArgumentException("Cookie origin may not be null");
  }
  String path = origin.getPath();
  if (path == null) {
    throw new IllegalArgumentException(
        "Path of origin host may not be null.");
  }
  if (cookie.getPath() == null) {
    throw new MalformedCookieException("Invalid cookie state: " +
                      "path attribute is null.");
  }
  if (path.trim().equals("")) {
    path = PATH_DELIM;
  }
  if (!pathMatch(path, cookie.getPath())) {
    throw new MalformedCookieException(
        "Illegal path attribute \"" + cookie.getPath()
        + "\". Path of origin: \"" + path + "\"");
  }
}
origin: org.apache.commons/httpclient

  /**
   * Match cookie path attribute. The value for the Path attribute must be a
   * prefix of the request-URI (case-sensitive matching).
   */
  public boolean match(final Cookie cookie, final CookieOrigin origin) {
    if (cookie == null) {
      throw new IllegalArgumentException("Cookie may not be null");
    }
    if (origin == null) {
      throw new IllegalArgumentException("Cookie origin may not be null");
    }
    String path = origin.getPath();
    if (cookie.getPath() == null) {
      LOG.warn("Invalid cookie state: path attribute is null.");
      return false;
    }
    if (path.trim().equals("")) {
      path = PATH_DELIM;
    }
    if (!pathMatch(path, cookie.getPath())) {
      return false;
    }
    return true;
  }
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-httpclient

  /**
   * Match cookie path attribute. The value for the Path attribute must be a
   * prefix of the request-URI (case-sensitive matching).
   */
  public boolean match(final Cookie cookie, final CookieOrigin origin) {
    if (cookie == null) {
      throw new IllegalArgumentException("Cookie may not be null");
    }
    if (origin == null) {
      throw new IllegalArgumentException("Cookie origin may not be null");
    }
    String path = origin.getPath();
    if (cookie.getPath() == null) {
      LOG.warn("Invalid cookie state: path attribute is null.");
      return false;
    }
    if (path.trim().equals("")) {
      path = PATH_DELIM;
    }
    if (!pathMatch(path, cookie.getPath())) {
      return false;
    }
    return true;
  }
}
origin: org.wso2.commons-httpclient/commons-httpclient

  /**
   * Match cookie path attribute. The value for the Path attribute must be a
   * prefix of the request-URI (case-sensitive matching).
   */
  public boolean match(final Cookie cookie, final CookieOrigin origin) {
    if (cookie == null) {
      throw new IllegalArgumentException("Cookie may not be null");
    }
    if (origin == null) {
      throw new IllegalArgumentException("Cookie origin may not be null");
    }
    String path = origin.getPath();
    if (cookie.getPath() == null) {
      LOG.warn("Invalid cookie state: path attribute is null.");
      return false;
    }
    if (path.trim().equals("")) {
      path = PATH_DELIM;
    }
    if (!pathMatch(path, cookie.getPath())) {
      return false;
    }
    return true;
  }
}
origin: org.apache.commons/com.springsource.org.apache.commons.httpclient

  /**
   * Match cookie path attribute. The value for the Path attribute must be a
   * prefix of the request-URI (case-sensitive matching).
   */
  public boolean match(final Cookie cookie, final CookieOrigin origin) {
    if (cookie == null) {
      throw new IllegalArgumentException("Cookie may not be null");
    }
    if (origin == null) {
      throw new IllegalArgumentException("Cookie origin may not be null");
    }
    String path = origin.getPath();
    if (cookie.getPath() == null) {
      LOG.warn("Invalid cookie state: path attribute is null.");
      return false;
    }
    if (path.trim().equals("")) {
      path = PATH_DELIM;
    }
    if (!pathMatch(path, cookie.getPath())) {
      return false;
    }
    return true;
  }
}
origin: org.apache.commons/com.springsource.org.apache.commons.httpclient

/**
 * Validate cookie path attribute. The value for the Path attribute must be a
 * prefix of the request-URI (case-sensitive matching).
 */
public void validate(final Cookie cookie, final CookieOrigin origin)
    throws MalformedCookieException {
  if (cookie == null) {
    throw new IllegalArgumentException("Cookie may not be null");
  }
  if (origin == null) {
    throw new IllegalArgumentException("Cookie origin may not be null");
  }
  String path = origin.getPath();
  if (path == null) {
    throw new IllegalArgumentException(
        "Path of origin host may not be null.");
  }
  if (cookie.getPath() == null) {
    throw new MalformedCookieException("Invalid cookie state: " +
                      "path attribute is null.");
  }
  if (path.trim().equals("")) {
    path = PATH_DELIM;
  }
  if (!pathMatch(path, cookie.getPath())) {
    throw new MalformedCookieException(
        "Illegal path attribute \"" + cookie.getPath()
        + "\". Path of origin: \"" + path + "\"");
  }
}
origin: org.apache.commons/httpclient

/**
 * Validate cookie path attribute. The value for the Path attribute must be a
 * prefix of the request-URI (case-sensitive matching).
 */
public void validate(final Cookie cookie, final CookieOrigin origin)
    throws MalformedCookieException {
  if (cookie == null) {
    throw new IllegalArgumentException("Cookie may not be null");
  }
  if (origin == null) {
    throw new IllegalArgumentException("Cookie origin may not be null");
  }
  String path = origin.getPath();
  if (path == null) {
    throw new IllegalArgumentException(
        "Path of origin host may not be null.");
  }
  if (cookie.getPath() == null) {
    throw new MalformedCookieException("Invalid cookie state: " +
                      "path attribute is null.");
  }
  if (path.trim().equals("")) {
    path = PATH_DELIM;
  }
  if (!pathMatch(path, cookie.getPath())) {
    throw new MalformedCookieException(
        "Illegal path attribute \"" + cookie.getPath()
        + "\". Path of origin: \"" + path + "\"");
  }
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-httpclient

/**
 * Validate cookie path attribute. The value for the Path attribute must be a
 * prefix of the request-URI (case-sensitive matching).
 */
public void validate(final Cookie cookie, final CookieOrigin origin)
    throws MalformedCookieException {
  if (cookie == null) {
    throw new IllegalArgumentException("Cookie may not be null");
  }
  if (origin == null) {
    throw new IllegalArgumentException("Cookie origin may not be null");
  }
  String path = origin.getPath();
  if (path == null) {
    throw new IllegalArgumentException(
        "Path of origin host may not be null.");
  }
  if (cookie.getPath() == null) {
    throw new MalformedCookieException("Invalid cookie state: " +
                      "path attribute is null.");
  }
  if (path.trim().equals("")) {
    path = PATH_DELIM;
  }
  if (!pathMatch(path, cookie.getPath())) {
    throw new MalformedCookieException(
        "Illegal path attribute \"" + cookie.getPath()
        + "\". Path of origin: \"" + path + "\"");
  }
}
origin: org.wso2.commons-httpclient/commons-httpclient

/**
 * Validate cookie path attribute. The value for the Path attribute must be a
 * prefix of the request-URI (case-sensitive matching).
 */
public void validate(final Cookie cookie, final CookieOrigin origin)
    throws MalformedCookieException {
  if (cookie == null) {
    throw new IllegalArgumentException("Cookie may not be null");
  }
  if (origin == null) {
    throw new IllegalArgumentException("Cookie origin may not be null");
  }
  String path = origin.getPath();
  if (path == null) {
    throw new IllegalArgumentException(
        "Path of origin host may not be null.");
  }
  if (cookie.getPath() == null) {
    throw new MalformedCookieException("Invalid cookie state: " +
                      "path attribute is null.");
  }
  if (path.trim().equals("")) {
    path = PATH_DELIM;
  }
  if (!pathMatch(path, cookie.getPath())) {
    throw new MalformedCookieException(
        "Illegal path attribute \"" + cookie.getPath()
        + "\". Path of origin: \"" + path + "\"");
  }
}
org.apache.commons.httpclient.cookieRFC2965SpecpathMatch

Popular methods of RFC2965Spec

  • <init>
    Default constructor
  • createPortAttribute
    Retrieves valid Port attribute value for the given ports array. e.g. "8000,8001,8002"
  • doFormatCookie2
  • domainMatch
    Performs domain-match as defined by the RFC2965. Host A's name domain-matches host B's if 1. their h
  • findAttribHandler
    Finds an attribute handler CookieAttributeHandler for the given attribute. Returns null if no attrib
  • getAttribHandlerIterator
  • getEffectiveHost
    Gets 'effective host name' as defined in RFC 2965. If a host name contains no dots, the effective ho
  • getVersion
  • parse
    Parses the Set-Cookie2 value into an array of Cookies.The syntax for the Set-Cookie2 response header
  • parseAttribute
    Parse RFC 2965 specific cookie attribute and update the corresponsing org.apache.commons.httpclient.
  • registerAttribHandler
  • registerAttribHandler

Popular in Java

  • Creating JSON documents from java classes using gson
  • setScale (BigDecimal)
  • putExtra (Intent)
  • setRequestProperty (URLConnection)
  • BufferedInputStream (java.io)
    A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the i
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • InputStream (java.io)
    A readable source of bytes.Most clients will use input streams that read data from the file system (
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • Path (java.nio.file)
  • JCheckBox (javax.swing)
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now