From 016dabcf047a5788812d86bdbd69b2da7f9faee1 Mon Sep 17 00:00:00 2001
From: Daniel Stenberg <daniel@haxx.se>
Date: Tue, 3 Jul 2012 11:10:41 +0200
Subject: [PATCH] HTTP-COOKIES: clarified and modified layout

---
 docs/HTTP-COOKIES | 36 ++++++++++++++++++++++--------------
 1 file changed, 22 insertions(+), 14 deletions(-)

diff --git a/docs/HTTP-COOKIES b/docs/HTTP-COOKIES
index 4fccb9d9ed..818e161eef 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.
 
-3. Cookies with curl the command line tool
+  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.
+
+  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