mirror of
https://github.com/curl/curl.git
synced 2026-08-25 07:43:32 +03:00
docs: cookies from HTTP headers need domain set
... or the cookies won't get sent. Push users to using the "Netscape" format instead, which curl uses when saving a cookie "jar". Reported-by: Martin Dorey Reviewed-by: Daniel Gustafsson Fixes #6723 Closes #7077
This commit is contained in:
parent
e38a826572
commit
5dfa4c08bb
2 changed files with 8 additions and 15 deletions
|
|
@ -44,13 +44,10 @@ 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 don't 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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue