// From RFC2109: "Attributes (names) (attr) are case-insensitive."
if (pair_num != 0)
- StringToLowerASCII(&pair.first);
+ base::StringToLowerASCII(&pair.first);
// Ignore Set-Cookie directives contaning control characters. See
// http://crbug.com/238041.
if (!IsValidCookieAttributeValue(pair.first) ||
}
void ParsedCookie::SetupAttributes() {
+ // Ignore Set-Cookie directive where name and value are both empty.
+ if (pairs_[0].first.empty() && pairs_[0].second.empty()) {
+ pairs_.clear();
+ return;
+ }
+
// We skip over the first token/value, the user supplied one.
for (size_t i = 1; i < pairs_.size(); ++i) {
if (pairs_[i].first == kPathTokenName) {