Tabnine Logo
RFC2965DomainAttributeHandler.domainMatch
Code IndexAdd Tabnine to your IDE (free)

How to use
domainMatch
method
in
org.apache.http.impl.cookie.RFC2965DomainAttributeHandler

Best Java code snippets using org.apache.http.impl.cookie.RFC2965DomainAttributeHandler.domainMatch (Showing top 20 results out of 315)

origin: robovm/robovm

/**
 * 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(Locale.ENGLISH);
  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());
  return effectiveHostWithoutDomain.indexOf('.') == -1;
}
origin: robovm/robovm

if (!domainMatch(host, cookieDomain)) {
  throw new MalformedCookieException(
      "Domain attribute \"" + cookie.getDomain()
origin: com.mobidevelop.robovm/robovm-rt

/**
 * 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(Locale.ENGLISH);
  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());
  return effectiveHostWithoutDomain.indexOf('.') == -1;
}
origin: MobiVM/robovm

/**
 * 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(Locale.ENGLISH);
  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());
  return effectiveHostWithoutDomain.indexOf('.') == -1;
}
origin: com.gluonhq/robovm-rt

/**
 * 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(Locale.ENGLISH);
  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());
  return effectiveHostWithoutDomain.indexOf('.') == -1;
}
origin: FlexoVM/flexovm

/**
 * 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(Locale.ENGLISH);
  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());
  return effectiveHostWithoutDomain.indexOf('.') == -1;
}
origin: com.hynnet/httpclient

/**
 * Match cookie domain attribute.
 */
@Override
public boolean match(final Cookie cookie, final CookieOrigin origin) {
  Args.notNull(cookie, "Cookie");
  Args.notNull(origin, "Cookie origin");
  final String host = origin.getHost().toLowerCase(Locale.ROOT);
  final 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
  final String effectiveHostWithoutDomain = host.substring(
      0, host.length() - cookieDomain.length());
  return effectiveHostWithoutDomain.indexOf('.') == -1;
}
origin: ibinti/bugvm

/**
 * Match cookie domain attribute.
 */
@Override
public boolean match(final Cookie cookie, final CookieOrigin origin) {
  Args.notNull(cookie, "Cookie");
  Args.notNull(origin, "Cookie origin");
  final String host = origin.getHost().toLowerCase(Locale.ROOT);
  final 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
  final String effectiveHostWithoutDomain = host.substring(
      0, host.length() - cookieDomain.length());
  return effectiveHostWithoutDomain.indexOf('.') == -1;
}
origin: com.bugvm/bugvm-rt

/**
 * Match cookie domain attribute.
 */
@Override
public boolean match(final Cookie cookie, final CookieOrigin origin) {
  Args.notNull(cookie, "Cookie");
  Args.notNull(origin, "Cookie origin");
  final String host = origin.getHost().toLowerCase(Locale.ROOT);
  final 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
  final String effectiveHostWithoutDomain = host.substring(
      0, host.length() - cookieDomain.length());
  return effectiveHostWithoutDomain.indexOf('.') == -1;
}
origin: at.bestsolution.efxclipse.eclipse/org.apache.httpcomponents.httpclient

/**
 * Match cookie domain attribute.
 */
public boolean match(final Cookie cookie, final CookieOrigin origin) {
  Args.notNull(cookie, "Cookie");
  Args.notNull(origin, "Cookie origin");
  final String host = origin.getHost().toLowerCase(Locale.ENGLISH);
  final 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
  final String effectiveHostWithoutDomain = host.substring(
      0, host.length() - cookieDomain.length());
  return effectiveHostWithoutDomain.indexOf('.') == -1;
}
origin: com.impetus.fabric/fabric-jdbc-driver-shaded

/**
 * Match cookie domain attribute.
 */
@Override
public boolean match(final Cookie cookie, final CookieOrigin origin) {
  Args.notNull(cookie, "Cookie");
  Args.notNull(origin, "Cookie origin");
  final String host = origin.getHost().toLowerCase(Locale.ROOT);
  final 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
  final String effectiveHostWithoutDomain = host.substring(
      0, host.length() - cookieDomain.length());
  return effectiveHostWithoutDomain.indexOf('.') == -1;
}
origin: Nextdoor/bender

/**
 * Match cookie domain attribute.
 */
@Override
public boolean match(final Cookie cookie, final CookieOrigin origin) {
  Args.notNull(cookie, "Cookie");
  Args.notNull(origin, "Cookie origin");
  final String host = origin.getHost().toLowerCase(Locale.ROOT);
  final 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
  final String effectiveHostWithoutDomain = host.substring(
      0, host.length() - cookieDomain.length());
  return effectiveHostWithoutDomain.indexOf('.') == -1;
}
origin: com.mobidevelop.robovm/robovm-rt

if (!domainMatch(host, cookieDomain)) {
  throw new MalformedCookieException(
      "Domain attribute \"" + cookie.getDomain()
origin: com.gluonhq/robovm-rt

if (!domainMatch(host, cookieDomain)) {
  throw new MalformedCookieException(
      "Domain attribute \"" + cookie.getDomain()
origin: MobiVM/robovm

if (!domainMatch(host, cookieDomain)) {
  throw new MalformedCookieException(
      "Domain attribute \"" + cookie.getDomain()
origin: FlexoVM/flexovm

if (!domainMatch(host, cookieDomain)) {
  throw new MalformedCookieException(
      "Domain attribute \"" + cookie.getDomain()
origin: ibinti/bugvm

if (!domainMatch(host, cookieDomain)) {
  throw new CookieRestrictionViolationException(
      "Domain attribute \"" + cookie.getDomain()
origin: com.hynnet/httpclient

if (!domainMatch(host, cookieDomain)) {
  throw new CookieRestrictionViolationException(
      "Domain attribute \"" + cookie.getDomain()
origin: at.bestsolution.efxclipse.eclipse/org.apache.httpcomponents.httpclient

if (!domainMatch(host, cookieDomain)) {
  throw new CookieRestrictionViolationException(
      "Domain attribute \"" + cookie.getDomain()
origin: com.bugvm/bugvm-rt

if (!domainMatch(host, cookieDomain)) {
  throw new CookieRestrictionViolationException(
      "Domain attribute \"" + cookie.getDomain()
org.apache.http.impl.cookieRFC2965DomainAttributeHandlerdomainMatch

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 RFC2965DomainAttributeHandler

  • <init>

Popular in Java

  • Making http requests using okhttp
  • addToBackStack (FragmentTransaction)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • VirtualMachine (com.sun.tools.attach)
    A Java virtual machine. A VirtualMachine represents a Java virtual machine to which this Java vir
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • DecimalFormat (java.text)
    A concrete subclass of NumberFormat that formats decimal numbers. It has a variety of features desig
  • Iterator (java.util)
    An iterator over a sequence of objects, such as a collection.If a collection has been changed since
  • BoxLayout (javax.swing)
  • From CI to AI: The AI layer in your organization
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