]> git.feebdaed.xyz Git - 0xmirror/curl.git/commit
cookie: avoid saving a cookie file if no transfer was done
authorDaniel Stenberg <daniel@haxx.se>
Fri, 19 Sep 2025 13:59:57 +0000 (15:59 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 19 Sep 2025 14:40:20 +0000 (16:40 +0200)
commitfd6eb8d6e77d95e71c0c55678b46173b21edd1e9
tree70249ae434f69a3091908cf9bd9c220796f29050
parent1055864b03beee1615c04421854e5e927a0cdb5d
cookie: avoid saving a cookie file if no transfer was done

Because parts of the cookie loading happens on transfer start the
in-memory cookie jar risks being incomplete and then a save might
wrongly truncate the target file.

Added test 1902 to verify.

Reported-by: divinity76 on github
Fixes #18621
Closes #18622
lib/cookie.c
tests/data/Makefile.am
tests/data/test1902 [new file with mode: 0644]
tests/libtest/Makefile.inc
tests/libtest/lib1902.c [new file with mode: 0644]