]> git.ipfire.org Git - thirdparty/curl.git/commit
cookie: flush better
authorDaniel Stenberg <daniel@haxx.se>
Thu, 25 Dec 2025 09:53:11 +0000 (10:53 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 25 Dec 2025 11:05:23 +0000 (12:05 +0100)
commit18af4e4e109f3825d1891c32aacb064fdd7e9dc4
treee69f4e858cd4ad3a90b57f2e1f2e952ff528585f
parente78a466ebddd35d25b14487ef4a03081e13773fe
cookie: flush better

The cookie flushing (saving to a cookie jar) should only be done if a
transfer has been started. This is now done by checking the
cookies->running field, which is not reset in curl_easy_reset() so the
saving works correctly even after a call to that.

Follow-up to fd6eb8d6e77d95e71c

Verified by test 1920

Reported-by: Alexander Batischev
Fixes #20090
Closes #20094
lib/cookie.c
tests/data/Makefile.am
tests/data/test1920 [new file with mode: 0644]
tests/libtest/Makefile.inc
tests/libtest/lib1920.c [new file with mode: 0644]