Home | History | Annotate | Download | only in cookie

Lines Matching defs:domain

53             throw new MalformedCookieException("Missing value for domain attribute");
56 throw new MalformedCookieException("Blank value for domain attribute");
70 String domain = cookie.getDomain();
71 if (domain == null) {
72 throw new MalformedCookieException("Cookie domain may not be null");
74 if (!domain.equals(host)) {
75 int dotIndex = domain.indexOf('.');
77 throw new MalformedCookieException("Domain attribute \""
78 + domain
82 // domain must start with dot
83 if (!domain.startsWith(".")) {
84 throw new MalformedCookieException("Domain attribute \""
85 + domain
86 + "\" violates RFC 2109: domain must start with a dot");
88 // domain must have at least one embedded dot
89 dotIndex = domain.indexOf('.', 1);
90 if (dotIndex < 0 || dotIndex == domain.length() - 1) {
91 throw new MalformedCookieException("Domain attribute \""
92 + domain
93 + "\" violates RFC 2109: domain must contain an embedded dot");
96 if (!host.endsWith(domain)) {
98 "Illegal domain attribute \"" + domain
99 + "\". Domain of origin: \"" + host + "\"");
101 // host minus domain may not contain any dots
102 String hostWithoutDomain = host.substring(0, host.length() - domain.length());
104 throw new MalformedCookieException("Domain attribute \""
105 + domain
106 + "\" violates RFC 2109: host minus domain may not contain any dots");
119 String domain = cookie.getDomain();
120 if (domain == null) {
123 return host.equals(domain) || (domain.startsWith(".") && host.endsWith(domain));