Codota Logo
RFC2965Spec.domainMatch
Code IndexAdd Codota to your IDE (free)

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

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

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
StringBuilder s =
  • Codota Iconnew StringBuilder()
  • Codota Iconnew StringBuilder(32)
  • Codota IconString str;new StringBuilder(str)
  • Smart code suggestions by Codota
}
origin: commons-httpclient/commons-httpclient

/**
 * Match cookie domain attribute.
 */
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 host = origin.getHost().toLowerCase();
  String cookieDomain = cookie.getDomain();
  // The effective host name MUST domain-match the Domain
  // attribute of the cookie.
  if (!domainMatch(host, cookieDomain)) {
    return false;
  }
  // effective host name minus domain must not contain any dots
  String effectiveHostWithoutDomain = host.substring(
      0, host.length() - cookieDomain.length());
  if (effectiveHostWithoutDomain.indexOf('.') != -1) {
    return false;
  }
  return true;
}
origin: commons-httpclient/commons-httpclient

if (!domainMatch(host, cookieDomain)) {
  throw new MalformedCookieException(
      "Domain attribute \"" + cookie.getDomain()
origin: org.apache.commons/com.springsource.org.apache.commons.httpclient

/**
 * Match cookie domain attribute.
 */
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 host = origin.getHost().toLowerCase();
  String cookieDomain = cookie.getDomain();
  // The effective host name MUST domain-match the Domain
  // attribute of the cookie.
  if (!domainMatch(host, cookieDomain)) {
    return false;
  }
  // effective host name minus domain must not contain any dots
  String effectiveHostWithoutDomain = host.substring(
      0, host.length() - cookieDomain.length());
  if (effectiveHostWithoutDomain.indexOf('.') != -1) {
    return false;
  }
  return true;
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-httpclient

/**
 * Match cookie domain attribute.
 */
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 host = origin.getHost().toLowerCase();
  String cookieDomain = cookie.getDomain();
  // The effective host name MUST domain-match the Domain
  // attribute of the cookie.
  if (!domainMatch(host, cookieDomain)) {
    return false;
  }
  // effective host name minus domain must not contain any dots
  String effectiveHostWithoutDomain = host.substring(
      0, host.length() - cookieDomain.length());
  if (effectiveHostWithoutDomain.indexOf('.') != -1) {
    return false;
  }
  return true;
}
origin: org.apache.commons/httpclient

/**
 * Match cookie domain attribute.
 */
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 host = origin.getHost().toLowerCase();
  String cookieDomain = cookie.getDomain();
  // The effective host name MUST domain-match the Domain
  // attribute of the cookie.
  if (!domainMatch(host, cookieDomain)) {
    return false;
  }
  // effective host name minus domain must not contain any dots
  String effectiveHostWithoutDomain = host.substring(
      0, host.length() - cookieDomain.length());
  if (effectiveHostWithoutDomain.indexOf('.') != -1) {
    return false;
  }
  return true;
}
origin: org.wso2.commons-httpclient/commons-httpclient

/**
 * Match cookie domain attribute.
 */
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 host = origin.getHost().toLowerCase();
  String cookieDomain = cookie.getDomain();
  // The effective host name MUST domain-match the Domain
  // attribute of the cookie.
  if (!domainMatch(host, cookieDomain)) {
    return false;
  }
  // effective host name minus domain must not contain any dots
  String effectiveHostWithoutDomain = host.substring(
      0, host.length() - cookieDomain.length());
  if (effectiveHostWithoutDomain.indexOf('.') != -1) {
    return false;
  }
  return true;
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-httpclient

if (!domainMatch(host, cookieDomain)) {
  throw new MalformedCookieException(
      "Domain attribute \"" + cookie.getDomain()
origin: org.wso2.commons-httpclient/commons-httpclient

if (!domainMatch(host, cookieDomain)) {
  throw new MalformedCookieException(
      "Domain attribute \"" + cookie.getDomain()
origin: org.apache.commons/com.springsource.org.apache.commons.httpclient

if (!domainMatch(host, cookieDomain)) {
  throw new MalformedCookieException(
      "Domain attribute \"" + cookie.getDomain()
origin: org.apache.commons/httpclient

if (!domainMatch(host, cookieDomain)) {
  throw new MalformedCookieException(
      "Domain attribute \"" + cookie.getDomain()
org.apache.commons.httpclient.cookieRFC2965SpecdomainMatch

Javadoc

Performs domain-match as defined by the RFC2965.

Host A's name domain-matches host B's if

      their host name strings string-compare equal; or
      A is a HDN string and has the form NB, where N is a non-empty name string, B has the form .B', and B' is a HDN string. (So, x.y.com domain-matches .Y.com but not Y.com.)

Popular methods of RFC2965Spec

  • <init>
    Default constructor
  • createPortAttribute
    Retrieves valid Port attribute value for the given ports array. e.g. "8000,8001,8002"
  • doFormatCookie2
  • 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.
  • pathMatch
  • registerAttribHandler
  • registerAttribHandler

Popular in Java

  • Reading from database using SQL prepared statement
  • getSupportFragmentManager (FragmentActivity)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • requestLocationUpdates (LocationManager)
  • ObjectMapper (com.fasterxml.jackson.databind)
    This mapper (or, data binder, or codec) provides functionality for converting between Java objects (
  • ResourceBundle (java.util)
    Resource bundles contain locale-specific objects. When your program needs a locale-specific resource
  • Set (java.util)
    A collection that contains no duplicate elements. More formally, sets contain no pair of elements e1
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
  • JFrame (javax.swing)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now