curl-curl/tests/data/test1902
Daniel Stenberg fd6eb8d6e7
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
2025-09-19 16:40:20 +02:00

44 lines
775 B
Plaintext

<testcase>
<info>
<keywords>
cookies
</keywords>
</info>
# Client-side
<client>
<name>
set COOKIEFILE and COOKIEJAR but make no transfer
</name>
<features>
cookies
</features>
<tool>
lib%TESTNUMBER
</tool>
<command>
%LOGDIR/cookie%TESTNUMBER
</command>
<file name="%LOGDIR/cookie%TESTNUMBER">
# Netscape HTTP Cookie File
# https://curl.se/docs/http-cookies.html
# This file was generated by libcurl! Edit at your own risk.
example.com FALSE / FALSE 0 has_js 1
</file>
</client>
# Verify data after the test has been "shot"
<verify>
<file name="%LOGDIR/cookie%TESTNUMBER">
# Netscape HTTP Cookie File
# https://curl.se/docs/http-cookies.html
# This file was generated by libcurl! Edit at your own risk.
example.com FALSE / FALSE 0 has_js 1
</file>
</verify>
</testcase>