Codota Logo
RFC2965DomainAttributeHandler
Code IndexAdd Codota to your IDE (free)

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

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

  • Common ways to obtain RFC2965DomainAttributeHandler
private void myMethod () {
RFC2965DomainAttributeHandler r =
  • Codota Iconnew RFC2965DomainAttributeHandler()
  • Smart code suggestions by Codota
}
origin: robovm/robovm

public RFC2965Spec(final String[] datepatterns, boolean oneHeader) {
  super(datepatterns, oneHeader);
  registerAttribHandler(ClientCookie.DOMAIN_ATTR, new RFC2965DomainAttributeHandler());
  registerAttribHandler(ClientCookie.PORT_ATTR, new RFC2965PortAttributeHandler());
  registerAttribHandler(ClientCookie.COMMENTURL_ATTR, new RFC2965CommentUrlAttributeHandler());
  registerAttribHandler(ClientCookie.DISCARD_ATTR, new RFC2965DiscardAttributeHandler());
  registerAttribHandler(ClientCookie.VERSION_ATTR, new RFC2965VersionAttributeHandler());
}

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: MobiVM/robovm

public RFC2965Spec(final String[] datepatterns, boolean oneHeader) {
  super(datepatterns, oneHeader);
  registerAttribHandler(ClientCookie.DOMAIN_ATTR, new RFC2965DomainAttributeHandler());
  registerAttribHandler(ClientCookie.PORT_ATTR, new RFC2965PortAttributeHandler());
  registerAttribHandler(ClientCookie.COMMENTURL_ATTR, new RFC2965CommentUrlAttributeHandler());
  registerAttribHandler(ClientCookie.DISCARD_ATTR, new RFC2965DiscardAttributeHandler());
  registerAttribHandler(ClientCookie.VERSION_ATTR, new RFC2965VersionAttributeHandler());
}

origin: robovm/robovm

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

public RFC2965Spec(final String[] datepatterns, final boolean oneHeader) {
  super(datepatterns, oneHeader);
  registerAttribHandler(ClientCookie.DOMAIN_ATTR, new RFC2965DomainAttributeHandler());
  registerAttribHandler(ClientCookie.PORT_ATTR, new RFC2965PortAttributeHandler());
  registerAttribHandler(ClientCookie.COMMENTURL_ATTR, new RFC2965CommentUrlAttributeHandler());
  registerAttribHandler(ClientCookie.DISCARD_ATTR, new RFC2965DiscardAttributeHandler());
  registerAttribHandler(ClientCookie.VERSION_ATTR, new RFC2965VersionAttributeHandler());
}
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: com.mobidevelop.robovm/robovm-rt

public RFC2965Spec(final String[] datepatterns, boolean oneHeader) {
  super(datepatterns, oneHeader);
  registerAttribHandler(ClientCookie.DOMAIN_ATTR, new RFC2965DomainAttributeHandler());
  registerAttribHandler(ClientCookie.PORT_ATTR, new RFC2965PortAttributeHandler());
  registerAttribHandler(ClientCookie.COMMENTURL_ATTR, new RFC2965CommentUrlAttributeHandler());
  registerAttribHandler(ClientCookie.DISCARD_ATTR, new RFC2965DiscardAttributeHandler());
  registerAttribHandler(ClientCookie.VERSION_ATTR, new RFC2965VersionAttributeHandler());
}

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

public RFC2965Spec(final String[] datepatterns, boolean oneHeader) {
  super(datepatterns, oneHeader);
  registerAttribHandler(ClientCookie.DOMAIN_ATTR, new RFC2965DomainAttributeHandler());
  registerAttribHandler(ClientCookie.PORT_ATTR, new RFC2965PortAttributeHandler());
  registerAttribHandler(ClientCookie.COMMENTURL_ATTR, new RFC2965CommentUrlAttributeHandler());
  registerAttribHandler(ClientCookie.DISCARD_ATTR, new RFC2965DiscardAttributeHandler());
  registerAttribHandler(ClientCookie.VERSION_ATTR, new RFC2965VersionAttributeHandler());
}

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

public RFC2965Spec(final String[] datepatterns, boolean oneHeader) {
  super(datepatterns, oneHeader);
  registerAttribHandler(ClientCookie.DOMAIN_ATTR, new RFC2965DomainAttributeHandler());
  registerAttribHandler(ClientCookie.PORT_ATTR, new RFC2965PortAttributeHandler());
  registerAttribHandler(ClientCookie.COMMENTURL_ATTR, new RFC2965CommentUrlAttributeHandler());
  registerAttribHandler(ClientCookie.DISCARD_ATTR, new RFC2965DiscardAttributeHandler());
  registerAttribHandler(ClientCookie.VERSION_ATTR, new RFC2965VersionAttributeHandler());
}

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: ibinti/bugvm

public RFC2965Spec(final String[] datepatterns, final boolean oneHeader) {
  super(oneHeader,
      new RFC2965VersionAttributeHandler(),
      new BasicPathHandler(),
      new RFC2965DomainAttributeHandler(),
      new RFC2965PortAttributeHandler(),
      new BasicMaxAgeHandler(),
      new BasicSecureHandler(),
      new BasicCommentHandler(),
      new BasicExpiresHandler(
          datepatterns != null ? datepatterns.clone() : DATE_PATTERNS),
      new RFC2965CommentUrlAttributeHandler(),
      new RFC2965DiscardAttributeHandler());
}
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

public RFC2965Spec(final String[] datepatterns, final boolean oneHeader) {
  super(oneHeader,
      new RFC2965VersionAttributeHandler(),
      new BasicPathHandler(),
      new RFC2965DomainAttributeHandler(),
      new RFC2965PortAttributeHandler(),
      new BasicMaxAgeHandler(),
      new BasicSecureHandler(),
      new BasicCommentHandler(),
      new BasicExpiresHandler(
          datepatterns != null ? datepatterns.clone() : DATE_PATTERNS),
      new RFC2965CommentUrlAttributeHandler(),
      new RFC2965DiscardAttributeHandler());
}
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.hynnet/httpclient

public RFC2965Spec(final String[] datepatterns, final boolean oneHeader) {
  super(oneHeader,
      new RFC2965VersionAttributeHandler(),
      new BasicPathHandler(),
      new RFC2965DomainAttributeHandler(),
      new RFC2965PortAttributeHandler(),
      new BasicMaxAgeHandler(),
      new BasicSecureHandler(),
      new BasicCommentHandler(),
      new BasicExpiresHandler(
          datepatterns != null ? datepatterns.clone() : DATE_PATTERNS),
      new RFC2965CommentUrlAttributeHandler(),
      new RFC2965DiscardAttributeHandler());
}
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: Nextdoor/bender

public RFC2965Spec(final String[] datepatterns, final boolean oneHeader) {
  super(oneHeader,
      new RFC2965VersionAttributeHandler(),
      new BasicPathHandler(),
      new RFC2965DomainAttributeHandler(),
      new RFC2965PortAttributeHandler(),
      new BasicMaxAgeHandler(),
      new BasicSecureHandler(),
      new BasicCommentHandler(),
      new BasicExpiresHandler(
          datepatterns != null ? datepatterns.clone() : DATE_PATTERNS),
      new RFC2965CommentUrlAttributeHandler(),
      new RFC2965DiscardAttributeHandler());
}
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;
}
org.apache.http.impl.cookieRFC2965DomainAttributeHandler

Javadoc

"Domain" cookie attribute handler for RFC 2965 cookie spec.

Most used methods

  • <init>
  • domainMatch
    Performs domain-match as defined by the RFC2965. Host A's name domain-matches host B's if 1. their

Popular in Java

  • Start an intent from android
  • compareTo (BigDecimal)
  • getSupportFragmentManager (FragmentActivity)
    Return the FragmentManager for interacting with fragments associated with this activity.
  • setScale (BigDecimal)
    Returns a BigDecimal whose scale is the specified value, and whose value is numerically equal to thi
  • Graphics2D (java.awt)
    This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • IOException (java.io)
    Signals that an I/O exception of some sort has occurred. This class is the general class of exceptio
  • Socket (java.net)
    Provides a client-side TCP socket.
  • Queue (java.util)
    A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
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