diff options
author | Daniel Stenberg <daniel@haxx.se> | 2012-07-03 11:10:41 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2012-07-03 11:10:41 +0200 |
commit | 016dabcf047a5788812d86bdbd69b2da7f9faee1 (patch) | |
tree | 35c7596844812e47123bc1fa7533e7dc22cb5cbc /docs/HTTP-COOKIES | |
parent | ae8f08ee5919fe6ab5a2850f3151077baf7077de (diff) |
HTTP-COOKIES: clarified and modified layout
Diffstat (limited to 'docs/HTTP-COOKIES')
-rw-r--r-- | docs/HTTP-COOKIES | 36 |
1 files changed, 22 insertions, 14 deletions
diff --git a/docs/HTTP-COOKIES b/docs/HTTP-COOKIES index 4fccb9d9e..818e161ee 100644 --- a/docs/HTTP-COOKIES +++ b/docs/HTTP-COOKIES @@ -8,15 +8,18 @@ Updated: July 3, 2012 (http://curl.haxx.se/docs/http-cookies.html) HTTP Cookies - 1. Cookie overview - 2. Cookies saved to disk - 3. Cookies with curl the command line tool - 4. Cookies with libcurl - 5. Cookies with javascript + 1. HTTP Cookies + 1.1 Cookie overview + 1.2 Cookies saved to disk + 1.3 Cookies with curl the command line tool + 1.4 Cookies with libcurl + 1.5 Cookies with javascript ============================================================================== -1. Cookie overview +1. HTTP Cookies + + 1.1 Cookie overview HTTP cookies are pieces of 'name=contents' snippets that a server tells the client to hold and then the client sends back those the server on subsequent @@ -36,18 +39,21 @@ HTTP Cookies In 2011, RFC6265 (http://www.ietf.org/rfc/rfc6265.txt) was finally published and details how cookies work within HTTP. -2. Cookies saved to disk + 1.2 Cookies saved to disk Netscape once created a file format for storing cookies on disk so that they would survive browser restarts. curl adopted that file format to allow sharing the cookies with browsers, only to see browsers move away from that format. Modern browsers no longer use it, while curl still does. - The cookie file format stores one cookie per physical line in the file with - a bunch of associated meta data, each field separated with TAB. That file is - called the cookiejar in curl terminology. + The netscape cookie file format stores one cookie per physical line in the + file with a bunch of associated meta data, each field separated with + TAB. That file is called the cookiejar in curl terminology. + + 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. -3. Cookies with curl the command line tool + 1.3 Cookies with curl the command line tool curl has a full cookie "engine" built in. If you just activate it, you can have curl receive and send cookies exactly as mandated in the specs. @@ -70,9 +76,11 @@ HTTP Cookies tell curl to start the cookie engine and write cookies to the given file after the request(s) -4. Cookies with libcurl + 1.4 Cookies with libcurl - libcurl options: + libcurl offers several ways to enable and interface the cookie engine. These + options are the ones provided by the native API. libcurl bindings may offer + access to them using other means. CURLOPT_COOKIE @@ -101,7 +109,7 @@ HTTP Cookies Extract cookie information from the internal cookie storage as a linked list. -5. Cookies with javascript + 1.5 Cookies with javascript These days a lot of the web is built up by javascript. The webbrowser loads complete programs that render the page you see. These javascript programs |