Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

HTTP-COOKIES: clarified and modified layout

  • Loading branch information...
commit 016dabcf047a5788812d86bdbd69b2da7f9faee1 1 parent ae8f08e
Daniel Stenberg authored July 03, 2012

Showing 1 changed file with 22 additions and 14 deletions. Show diff stats Hide diff stats

  1. 36  docs/HTTP-COOKIES
36  docs/HTTP-COOKIES
@@ -8,15 +8,18 @@ Updated: July 3, 2012 (http://curl.haxx.se/docs/http-cookies.html)
8 8
 
9 9
 HTTP Cookies
10 10
 
11  
- 1. Cookie overview
12  
- 2. Cookies saved to disk
13  
- 3. Cookies with curl the command line tool
14  
- 4. Cookies with libcurl
15  
- 5. Cookies with javascript
  11
+ 1. HTTP Cookies
  12
+ 1.1 Cookie overview
  13
+ 1.2 Cookies saved to disk
  14
+ 1.3 Cookies with curl the command line tool
  15
+ 1.4 Cookies with libcurl
  16
+ 1.5 Cookies with javascript
16 17
 
17 18
 ==============================================================================
18 19
 
19  
-1. Cookie overview
  20
+1. HTTP Cookies
  21
+
  22
+  1.1 Cookie overview
20 23
 
21 24
   HTTP cookies are pieces of 'name=contents' snippets that a server tells the
22 25
   client to hold and then the client sends back those the server on subsequent
@@ -36,18 +39,21 @@ HTTP Cookies
36 39
   In 2011, RFC6265 (http://www.ietf.org/rfc/rfc6265.txt) was finally published
37 40
   and details how cookies work within HTTP.
38 41
 
39  
-2. Cookies saved to disk
  42
+  1.2 Cookies saved to disk
40 43
 
41 44
   Netscape once created a file format for storing cookies on disk so that they
42 45
   would survive browser restarts. curl adopted that file format to allow
43 46
   sharing the cookies with browsers, only to see browsers move away from that
44 47
   format. Modern browsers no longer use it, while curl still does.
45 48
 
46  
-  The cookie file format stores one cookie per physical line in the file with
47  
-  a bunch of associated meta data, each field separated with TAB. That file is
48  
-  called the cookiejar in curl terminology.
  49
+  The netscape cookie file format stores one cookie per physical line in the
  50
+  file with a bunch of associated meta data, each field separated with
  51
+  TAB. That file is called the cookiejar in curl terminology.
  52
+
  53
+  When libcurl saves a cookiejar, it creates a file header of its own in which
  54
+  there is a URL mention that will link to the web version of this document.
49 55
 
50  
-3. Cookies with curl the command line tool
  56
+  1.3 Cookies with curl the command line tool
51 57
 
52 58
   curl has a full cookie "engine" built in. If you just activate it, you can
53 59
   have curl receive and send cookies exactly as mandated in the specs.
@@ -70,9 +76,11 @@ HTTP Cookies
70 76
     tell curl to start the cookie engine and write cookies to the given file
71 77
     after the request(s)
72 78
 
73  
-4. Cookies with libcurl
  79
+  1.4 Cookies with libcurl
74 80
 
75  
-  libcurl options:
  81
+  libcurl offers several ways to enable and interface the cookie engine. These
  82
+  options are the ones provided by the native API. libcurl bindings may offer
  83
+  access to them using other means.
76 84
 
77 85
   CURLOPT_COOKIE
78 86
 
@@ -101,7 +109,7 @@ HTTP Cookies
101 109
     Extract cookie information from the internal cookie storage as a linked
102 110
     list.
103 111
 
104  
-5. Cookies with javascript
  112
+  1.5 Cookies with javascript
105 113
 
106 114
   These days a lot of the web is built up by javascript. The webbrowser loads
107 115
   complete programs that render the page you see. These javascript programs

0 notes on commit 016dabc

Please sign in to comment.
Something went wrong with that request. Please try again.