| 1092 | attributeValue = trimAsciiWhiteSpace(attributeValue); |
| 1093 | if (sessionAsciiEqualsIgnoreCase(attributeName, StringSpan("Domain"))) |
| 1094 | { |
| 1095 | if (attributeValue.sizeInBytes() > 0 and attributeValue.toCharSpan()[0] == '.') |
| 1096 | { |
| 1097 | attributeValue = sliceString(attributeValue, 1, attributeValue.sizeInBytes()); |
| 1098 | } |
| 1099 | if (attributeValue.isEmpty() or not cookieDomainAttributeMatches(attributeValue, parsed.host)) |
| 1100 | { |
| 1101 | return Result(true); |
| 1102 | } |
| 1103 | domain = attributeValue; |
| 1104 | explicitDomain = true; |
| 1105 | } |
| 1106 | else if (sessionAsciiEqualsIgnoreCase(attributeName, StringSpan("Path"))) |
| 1107 | { |
| 1108 | if (not attributeValue.isEmpty() and attributeValue.toCharSpan()[0] == '/' and |
| 1109 | isValidCookiePath(attributeValue)) |
| 1110 | { |
| 1111 | path = attributeValue; |
| 1112 | } |
| 1113 | } |