An invalid domain [ ] was specified for this cookie。
tomcat升级为8.5程序报错:
有点费解,以前8.0没问题。特此记录:
翻了一下tomcat源码。校验加了 "." "-"都不行。tomcat8.5改为了RFC6265,之前应该是LegacyCookieProcessor
private void validateDomain(String domain) {
int i = 0;
int prev = -1;
int cur = -1;
char[] chars = domain.toCharArray();
while (i < chars.length) {
prev = cur;
cur = chars[i];
if (!domainValid.get(cur)) {
throw new IllegalArgumentException(sm.getString(
"rfc6265CookieProcessor.invalidDomain", domain));
}
// labels must start with a letter or number
if ((prev == '.' || prev == -1) && (cur == &#