]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
cookie.d: Document use of empty string to enable cookie engine
authorJay Satiro <raysatiro@yahoo.com>
Sun, 7 Jan 2024 05:25:13 +0000 (00:25 -0500)
committerJay Satiro <raysatiro@yahoo.com>
Tue, 9 Jan 2024 08:40:47 +0000 (03:40 -0500)
- Explain that --cookie "" can be used to enable the cookie engine
  without reading any initial cookies.

As is documented in CURLOPT_COOKIEFILE.

Ref: https://curl.se/libcurl/c/CURLOPT_COOKIEFILE.html

Bug: https://github.com/curl/curl/issues/12643#issuecomment-1879844420
Reported-by: janko-js@users.noreply.github.com
Closes https://github.com/curl/curl/pull/12646

docs/cmdline-opts/cookie.d

index 0f858d6613b5de237db06e9219c073296a8a73ae..23f3f466a3ef5a14e2b51d3f9e73a9f07f041b72 100644 (file)
@@ -6,6 +6,7 @@ Arg: <data|filename>
 Protocols: HTTP
 Help: Send cookies from string/file
 Category: http
+Example: -b "" $URL
 Example: -b cookiefile $URL
 Example: -b cookiefile -c cookiefile $URL
 See-also: cookie-jar junk-session-cookies
@@ -23,8 +24,11 @@ If no '=' symbol is used in the argument, it is instead treated as a filename
 to read previously stored cookie from. This option also activates the cookie
 engine which makes curl record incoming cookies, which may be handy if you are
 using this in combination with the --location option or do multiple URL
-transfers on the same invoke. If the file name is exactly a minus ("-"), curl
-instead reads the contents from stdin.
+transfers on the same invoke.
+
+If the file name is exactly a minus ("-"), curl instead reads the contents from
+stdin. If the file name is an empty string ("") and is the only cookie input,
+curl will activate the cookie engine without any cookies.
 
 The file format of the file to read cookies from should be plain HTTP headers
 (Set-Cookie style) or the Netscape/Mozilla cookie file format.