Lines Matching defs:domain

62      * Parse cookie domain attribute.
64 public void parse(final SetCookie cookie, String domain)
69 if (domain == null) {
71 "Missing value for domain attribute");
73 if (domain.trim().length() == 0) {
75 "Blank value for domain attribute");
77 domain = domain.toLowerCase(Locale.ENGLISH);
78 if (!domain.startsWith(".")) {
82 // That effectively implies that the domain attribute
84 domain = '.' + domain;
86 cookie.setDomain(domain);
90 * Performs domain-match as defined by the RFC2965.
92 * Host A's name domain-matches host B's if
97 * x.y.com domain-matches .Y.com but not Y.com.)</ul>
101 * @param domain The cookie domain attribute.
102 * @return true if the specified host matches the given domain.
104 public boolean domainMatch(String host, String domain) {
105 boolean match = host.equals(domain)
106 || (domain.startsWith(".") && host.endsWith(domain));
112 * Validate cookie domain attribute.
125 "domain not specified");
134 cookie.getDomain() + "\" violates RFC 2109: domain must start with a dot");
148 // The effective host name must domain-match domain attribute.
153 + "domain-match domain attribute.");
156 // effective host name minus domain must not contain any dots
162 + "effective host minus domain may not contain any dots");
165 // Domain was not specified in header. In this case, domain must
168 throw new MalformedCookieException("Illegal domain attribute: \""
177 * Match cookie domain attribute.
189 // The effective host name MUST domain-match the Domain
194 // effective host name minus domain must not contain any dots