diff --git a/src/cookie.c b/src/cookie.c index 4f91bd5..d58ca5a 100644 --- a/src/cookie.c +++ b/src/cookie.c @@ -497,7 +497,8 @@ __parse_input(COOKIE this, char *hdr, char *host) this->expires = expires_candidate; } - if (cookie_get_domain(this) == NULL) { + const char *domain = cookie_get_domain(this); + if (domain == NULL || domain == __cookie_none) { cookie_set_domain(this, host); cookie_set_hostonly(this, TRUE); }