Tabnine Logo
CookieOrigin.getPath
Code IndexAdd Tabnine to your IDE (free)

How to use
getPath
method
in
org.apache.commons.httpclient.cookie.CookieOrigin

Best Java code snippets using org.apache.commons.httpclient.cookie.CookieOrigin.getPath (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.cookieCookieOrigingetPath

Popular methods of CookieOrigin

  • <init>
  • getHost
  • getPort
  • isSecure

Popular in Java

  • Reading from database using SQL prepared statement
  • requestLocationUpdates (LocationManager)
  • compareTo (BigDecimal)
  • getApplicationContext (Context)
  • Graphics2D (java.awt)
    This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
  • String (java.lang)
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • Notification (javax.management)
  • Reference (javax.naming)
  • LogFactory (org.apache.commons.logging)
    Factory for creating Log instances, with discovery and configuration features similar to that employ
  • Top plugins for Android Studio
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