cookie: treat a blank domain in Set-Cookie: as non-existing

This matches what RFC 6265 section 5.2.3 says.

Extended test 31 to verify.

Fixes #9164
Reported-by: Gwen Shapira
Closes #9177
This commit is contained in:
Daniel Stenberg 2022-07-19 00:05:43 +02:00
parent c2e72c7812
commit 4c0ac2aa59
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
2 changed files with 3 additions and 1 deletions

View file

@ -637,7 +637,7 @@ Curl_cookie_add(struct Curl_easy *data,
break;
}
}
else if(strcasecompare("domain", name)) {
else if(strcasecompare("domain", name) && whatptr[0]) {
bool is_ip;
/*