From 95db5705d005272efbf867e583463eb9eee628b0 Mon Sep 17 00:00:00 2001 From: tenor-thrifts Date: Thu, 7 Aug 2025 17:43:56 -0400 Subject: [PATCH] set default cookie domain to host Check for `domain` to be `NULL` or `__cookie_none` when setting default cookie domain to `host`. Without this fix, cookies without a domain from `login-url` are not used with siege URLs. --- src/cookie.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); }