diff options
author | Daniel Stenberg <daniel@haxx.se> | 2020-01-10 22:53:05 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2020-01-10 22:53:05 +0100 |
commit | f007fe050c19f59df8249adb766cd5d215dd77e9 (patch) | |
tree | 0ce2671c1e9256648695b8b08b03b946e9456ca2 | |
parent | 8bd14c871fcd0f857c7b9bad81ad8ff17d10d89b (diff) | |
download | curl-f007fe050c19f59df8249adb766cd5d215dd77e9.tar.gz |
HTTP-COOKIES.md: describe the cookie file format
... and refer to that file from from CURLOPT_COOKIEFILE.3 and
CURLOPT_COOKIELIST.3
Reported-by: bsammon on github
Fixes #4805
-rw-r--r-- | docs/HTTP-COOKIES.md | 18 | ||||
-rw-r--r-- | docs/libcurl/opts/CURLOPT_COOKIEFILE.3 | 6 | ||||
-rw-r--r-- | docs/libcurl/opts/CURLOPT_COOKIELIST.3 | 6 |
3 files changed, 28 insertions, 2 deletions
diff --git a/docs/HTTP-COOKIES.md b/docs/HTTP-COOKIES.md index 06790f8a7..ddf66f473 100644 --- a/docs/HTTP-COOKIES.md +++ b/docs/HTTP-COOKIES.md @@ -43,6 +43,24 @@ When libcurl saves a cookiejar, it creates a file header of its own in which there is a URL mention that will link to the web version of this document. +## Cookie file format + + The cookie file format is text based and stores one cookie per line. Lines + that start with `#` are treated as comments. + + Each line that each specifies a single cookie consists of seven text fields + separated with TAB characters. + + | Field | Example | Meaning | + |-------|-------------|-----------------------------------------------| + | 0 | example.com | Domain name | + | 1 | FALSE | Include subdomains boolean | + | 2 | /foobar/ | Path | + | 3 | TRUE | Set over a secure transport | + | 4 | 1462299217 | Expires at – seconds since Jan 1st 1970, or 0 | + | 5 | person | Name of the cookie | + | 6 | daniel | Value of the cookie | + ## Cookies with curl the command line tool curl has a full cookie "engine" built in. If you just activate it, you can diff --git a/docs/libcurl/opts/CURLOPT_COOKIEFILE.3 b/docs/libcurl/opts/CURLOPT_COOKIEFILE.3 index fb33e41f0..f327ec148 100644 --- a/docs/libcurl/opts/CURLOPT_COOKIEFILE.3 +++ b/docs/libcurl/opts/CURLOPT_COOKIEFILE.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * Copyright (C) 1998 - 2020, 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 @@ -75,6 +75,10 @@ if(curl) { curl_easy_cleanup(curl); } .fi +.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 .SH AVAILABILITY As long as HTTP is supported .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_COOKIELIST.3 b/docs/libcurl/opts/CURLOPT_COOKIELIST.3 index 7de4da882..f46d12eb9 100644 --- a/docs/libcurl/opts/CURLOPT_COOKIELIST.3 +++ b/docs/libcurl/opts/CURLOPT_COOKIELIST.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * Copyright (C) 1998 - 2020, 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 @@ -104,6 +104,10 @@ curl_easy_perform(curl); /* cookies imported from cookies.txt */ curl_easy_cleanup(curl); /* cookies exported to cookies.txt */ .fi +.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 .SH AVAILABILITY ALL was added in 7.14.1 |