Tabnine Logo
RFC2965Spec.domainMatch
Code IndexAdd Tabnine 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)

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

  • Updating database using SQL prepared statement
  • getSupportFragmentManager (FragmentActivity)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • getApplicationContext (Context)
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • KeyStore (java.security)
    KeyStore is responsible for maintaining cryptographic keys and their owners. The type of the syste
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • DataSource (javax.sql)
    An interface for the creation of Connection objects which represent a connection to a database. This
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • Top Sublime Text 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