← Commit list

48df7b29d9

Daniel Stenberg
Daniel Stenberg
2025-10-21
SUCCESS Duration: 146s

Subject

cookie: only count accepted cookies in Curl_cookie_add

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

lib/cookie.c+3 -1
@@ -750,7 +750,6 @@ parse_cookie_header(struct Curl_easy *data,
if(!co->name)
return CERR_BAD;
- data->req.setcookies++;
return CERR_OK;
}
@@ -1140,6 +1139,9 @@ Curl_cookie_add(struct Curl_easy *data,
if(co->expires && (co->expires < ci->next_expiration))
ci->next_expiration = co->expires;
+ if(httpheader)
+ data->req.setcookies++;
+
return co;
fail:
freecookie(co);