[master] da7d47e various cleanups

Per Buer perbu at varnish-cache.org
Thu Mar 7 10:36:33 CET 2013


commit da7d47efa57e3f81bdd5c823ecae0b79a6fc002e
Author: Per Buer <perbu at varnish-software.com>
Date:   Thu Mar 7 10:36:53 2013 +0100

    various cleanups

diff --git a/doc/sphinx/reference/vcl.rst b/doc/sphinx/reference/vcl.rst
index 731da16..ca9c4c0 100644
--- a/doc/sphinx/reference/vcl.rst
+++ b/doc/sphinx/reference/vcl.rst
@@ -27,7 +27,7 @@ When a new configuration is loaded, the varnishd management process
 translates the VCL code to C and compiles it to a shared object which
 is then dynamically linked into the server process.
 
-.. include:: ../include/vcl-syntax.rst
+.. .. include:: ../include/vcl-syntax.rst
 
 .. include:: ../include/vcl-backends.rst
 
diff --git a/doc/sphinx/users-guide/index.rst b/doc/sphinx/users-guide/index.rst
index bfedbae..a28b08f 100644
--- a/doc/sphinx/users-guide/index.rst
+++ b/doc/sphinx/users-guide/index.rst
@@ -11,7 +11,7 @@ The guide is split into short chapters, each chapter explaining a
 separate topic.
 
 .. toctree::
-   :maxdepth: 3
+   :maxdepth: 2
 
    configuration
    vcl
diff --git a/doc/sphinx/users-guide/vcl-backends.rst b/doc/sphinx/users-guide/vcl-backends.rst
index 4f721aa..586b221 100644
--- a/doc/sphinx/users-guide/vcl-backends.rst
+++ b/doc/sphinx/users-guide/vcl-backends.rst
@@ -7,10 +7,7 @@ Varnish has a concept of "backend" or "origin" servers. A backend
 server is the server providing the content Varnish will accelerate.
 
 Our first task is to tell Varnish where it can find its content. Start
-your favorite text editor and open the varnish default configuration
-file. If you installed from source this is
-/usr/local/etc/varnish/default.vcl, if you installed from a package it
-is probably /etc/varnish/default.vcl.
+your favorite text editor and open the relevant VCL file.
 
 Somewhere in the top there will be a section that looks a bit like this.::
 
diff --git a/doc/sphinx/users-guide/vcl-example1-manipulating-headers.rst b/doc/sphinx/users-guide/vcl-example1-manipulating-headers.rst
deleted file mode 100644
index 35dcb1e..0000000
--- a/doc/sphinx/users-guide/vcl-example1-manipulating-headers.rst
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-Manipulating request headers in VCL
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-Lets say we want to remove the cookie for all objects in the /images
-directory of our web server::
-
-  sub vcl_recv {
-    if (req.url ~ "^/images") {
-      unset req.http.cookie;
-    }
-  }
-
-Now, when the request is handled to the backend server there will be
-no cookie header. The interesting line is the one with the
-if-statement. It matches the URL, taken from the request object, and
-matches it against the regular expression. Note the match operator. If
-it matches the Cookie: header of the request is unset (deleted). 
-
diff --git a/doc/sphinx/users-guide/vcl-example2-manipulating-responses.rst b/doc/sphinx/users-guide/vcl-example2-manipulating-responses.rst
deleted file mode 100644
index 7362789..0000000
--- a/doc/sphinx/users-guide/vcl-example2-manipulating-responses.rst
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
-Altering the backend response
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-Here we override the TTL of a object comming from the backend if it
-matches certain criteria::
-
-  sub vcl_fetch {
-     if (req.url ~ "\.(png|gif|jpg)$") {
-       unset beresp.http.set-cookie;
-       set beresp.ttl = 1h;
-    }
-  }
-
-.. XXX ref hit-for-pass
-
-We also remove any Set-Cookie headers in order to avoid a hit-for-pass
-object to be created.
diff --git a/doc/sphinx/users-guide/vcl-example3-acls.rst b/doc/sphinx/users-guide/vcl-example3-acls.rst
deleted file mode 100644
index 3d0226a..0000000
--- a/doc/sphinx/users-guide/vcl-example3-acls.rst
+++ /dev/null
@@ -1,34 +0,0 @@
-
-ACLs
-~~~~
-
-You create a named access control list with the *acl* keyword. You can match
-the IP address of the client against an ACL with the match operator.::
-
-  # Who is allowed to purge....
-  acl local {
-      "localhost";
-      "192.168.1.0"/24; /* and everyone on the local network */
-      ! "192.168.1.23"; /* except for the dialin router */
-  }
-  
-  sub vcl_recv {
-    if (req.method == "PURGE") {
-      if (client.ip ~ local) {
-         return(lookup);
-      }
-    } 
-  }
-  
-  sub vcl_hit {
-     if (req.method == "PURGE") {
-       set obj.ttl = 0s;
-       error 200 "Purged.";
-      }
-  }
-
-  sub vcl_miss {
-    if (req.method == "PURGE") {
-      error 404 "Not in cache.";
-    }
-  }
diff --git a/doc/sphinx/users-guide/vcl-examples.rst b/doc/sphinx/users-guide/vcl-examples.rst
index fdd892a..931ec27 100644
--- a/doc/sphinx/users-guide/vcl-examples.rst
+++ b/doc/sphinx/users-guide/vcl-examples.rst
@@ -7,8 +7,9 @@ capabilites of the VCL language.
 
 .. toctree::
 
-  vcl-example1-manipulating-headers
-  vcl-example2-manipulating-responses
-  vcl-example3-acls
+  vcl-example-manipulating-headers
+  vcl-example-manipulating-responses
+  vcl-example-acls
+  vcl-example-websockets
 
 
diff --git a/doc/sphinx/users-guide/vcl.rst b/doc/sphinx/users-guide/vcl.rst
index 031cf36..0133dee 100644
--- a/doc/sphinx/users-guide/vcl.rst
+++ b/doc/sphinx/users-guide/vcl.rst
@@ -27,7 +27,7 @@ code commented out in default.vcl that ships with Varnish Cache.
 .. _users-guide-vcl_fetch_actions:
 
 .. toctree::
-   :maxdepth: 2
+   :maxdepth: 1
 
    vcl-syntax
    vcl-built-in-subs
diff --git a/doc/sphinx/users-guide/websockets.rst b/doc/sphinx/users-guide/websockets.rst
index a74353e..7217b88 100644
--- a/doc/sphinx/users-guide/websockets.rst
+++ b/doc/sphinx/users-guide/websockets.rst
@@ -1,6 +1,6 @@
 
-Using Websockets 
-----------------
+Implementing websocket support
+------------------------------
 
 Websockets is a technology for creating a bidirectional stream-based channel over HTTP.
 



More information about the varnish-commit mailing list