Class RFC2965DomainAttributeHandler

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean domainMatch​(java.lang.String host, java.lang.String domain)
      Performs domain-match as defined by the RFC2965.
      boolean match​(Cookie cookie, CookieOrigin origin)
      Match cookie domain attribute.
      void parse​(SetCookie cookie, java.lang.String domain)
      Parse cookie domain attribute.
      void validate​(Cookie cookie, CookieOrigin origin)
      Validate cookie domain attribute.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • RFC2965DomainAttributeHandler

        public RFC2965DomainAttributeHandler()
    • Method Detail

      • domainMatch

        public boolean domainMatch​(java.lang.String host,
                                   java.lang.String domain)
        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.)
        Parameters:
        host - host name where cookie is received from or being sent to.
        domain - The cookie domain attribute.
        Returns:
        true if the specified host matches the given domain.
      • match

        public boolean match​(Cookie cookie,
                             CookieOrigin origin)
        Match cookie domain attribute.
        Specified by:
        match in interface CookieAttributeHandler
        Parameters:
        cookie - Cookie to match
        origin - the cookie source to match against
        Returns:
        true if the match is successful; false otherwise