summaryrefslogtreecommitdiff
path: root/docs/libcurl/opts/CURLOPT_COOKIEFILE.3
diff options
context:
space:
mode:
Diffstat (limited to 'docs/libcurl/opts/CURLOPT_COOKIEFILE.3')
-rw-r--r--docs/libcurl/opts/CURLOPT_COOKIEFILE.324
1 files changed, 13 insertions, 11 deletions
diff --git a/docs/libcurl/opts/CURLOPT_COOKIEFILE.3 b/docs/libcurl/opts/CURLOPT_COOKIEFILE.3
index fc4bf93a6..8e9496f59 100644
--- a/docs/libcurl/opts/CURLOPT_COOKIEFILE.3
+++ b/docs/libcurl/opts/CURLOPT_COOKIEFILE.3
@@ -5,11 +5,11 @@
.\" * | (__| |_| | _ <| |___
.\" * \___|\___/|_| \_\_____|
.\" *
-.\" * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
.\" *
.\" * This software is licensed as described in the file COPYING, which
.\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
.\" *
.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
.\" * copies of the Software, and permit persons to whom the Software is
@@ -20,14 +20,16 @@
.\" *
.\" **************************************************************************
.\"
-.TH CURLOPT_COOKIEFILE 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_COOKIEFILE 3 "November 26, 2021" "libcurl 7.81.0" "curl_easy_setopt options"
.SH NAME
CURLOPT_COOKIEFILE \- file name to read cookies from
.SH SYNOPSIS
+.nf
#include <curl/curl.h>
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_COOKIEFILE, char *filename);
+.fi
.SH DESCRIPTION
Pass a pointer to a null-terminated string as parameter. It should point to
the file name of your file holding cookie data to read. The cookie data can be
@@ -45,19 +47,19 @@ libcurl will instead read from stdin.
This option only \fBreads\fP cookies. To make libcurl write cookies to file,
see \fICURLOPT_COOKIEJAR(3)\fP.
-Exercise caution if you are using this option and multiple transfers may occur.
-If you use the Set-Cookie format and don't specify a domain then the cookie is
-sent for any domain (even after redirects are followed) and cannot be modified
-by a server-set cookie. If a server sets a cookie of the same name then both
-will be sent on a future transfer to that server, likely not what you intended.
-To address these issues set a domain in Set-Cookie (doing that will include
-sub-domains) or use the Netscape format.
+If you use the Set-Cookie file format and do not specify a domain then the
+cookie is not sent since the domain will never match. To address this, set a
+domain in Set-Cookie line (doing that will include sub-domains) or preferably:
+use the Netscape format.
If you use this option multiple times, you just add more files to read.
Subsequent files will add more cookies.
The application does not have to keep the string around after setting this
option.
+
+Setting this option to NULL will (since 7.77.0) explicitly disable the cookie
+engine and clear the list of files to read cookies from.
.SH DEFAULT
NULL
.SH PROTOCOLS
@@ -79,7 +81,7 @@ if(curl) {
.SH "Cookie file format"
The cookie file format and general cookie concepts in curl are described in
the HTTP-COOKIES.md file, also hosted online here:
-https://curl.haxx.se/docs/http-cookies.html
+https://curl.se/docs/http-cookies.html
.SH AVAILABILITY
As long as HTTP is supported
.SH RETURN VALUE