Class RFC2965Spec

    • Constructor Detail

      • RFC2965Spec

        public RFC2965Spec()
        Default constructor
      • RFC2965Spec

        public RFC2965Spec​(java.lang.String[] datepatterns,
                           boolean oneHeader)
    • Method Detail

      • match

        public boolean match​(Cookie cookie,
                             CookieOrigin origin)
        Description copied from interface: CookieSpec
        Determines if a Cookie matches the target location.
        Specified by:
        match in interface CookieSpec
        Overrides:
        match in class CookieSpecBase
        Parameters:
        cookie - the Cookie to be matched
        origin - the target to test against
        Returns:
        true if the cookie should be submitted with a request with given attributes, false otherwise.
      • formatCookieAsVer

        protected void formatCookieAsVer​(org.apache.http.util.CharArrayBuffer buffer,
                                         Cookie cookie,
                                         int version)
        Adds valid Port attribute value, e.g. "8000,8001,8002"
        Overrides:
        formatCookieAsVer in class RFC2109Spec
        Parameters:
        buffer - The char array buffer to use for output
        cookie - The Cookie to be formatted as string
        version - The version to use.
      • adjustEffectiveHost

        private static CookieOrigin adjustEffectiveHost​(CookieOrigin origin)
        Set 'effective host name' as defined in RFC 2965.

        If a host name contains no dots, the effective host name is that name with the string .local appended to it. Otherwise the effective host name is the same as the host name. Note that all effective host names contain at least one dot.

        Parameters:
        origin - origin where cookie is received from or being sent to.
      • getVersion

        public int getVersion()
        Description copied from interface: CookieSpec
        Returns version of the state management this cookie specification conforms to.
        Specified by:
        getVersion in interface CookieSpec
        Overrides:
        getVersion in class RFC2109Spec
        Returns:
        version of the state management specification
      • getVersionHeader

        public org.apache.http.Header getVersionHeader()
        Description copied from interface: CookieSpec
        Returns a request header identifying what version of the state management specification is understood. May be null if the cookie specification does not support Cookie2 header.
        Specified by:
        getVersionHeader in interface CookieSpec
        Overrides:
        getVersionHeader in class RFC2109Spec