[master] d8f74bc Reindent with 4 spaces, 2 for continuations

Lasse Karstensen lkarsten at varnish-software.com
Thu Feb 27 10:34:41 CET 2014


commit d8f74bc538393bb8c67de3660c7126dc144487f2
Author: Lasse Karstensen <lkarsten at varnish-software.com>
Date:   Wed Feb 26 13:36:57 2014 +0100

    Reindent with 4 spaces, 2 for continuations

diff --git a/bin/varnishd/builtin.vcl b/bin/varnishd/builtin.vcl
index 09c08cc..a6a126d 100644
--- a/bin/varnishd/builtin.vcl
+++ b/bin/varnishd/builtin.vcl
@@ -46,12 +46,12 @@ vcl 4.0;
 
 sub vcl_recv {
     if (req.restarts == 0) {
-	if (req.http.x-forwarded-for) {
-	    set req.http.X-Forwarded-For =
-		req.http.X-Forwarded-For + ", " + client.ip;
-	} else {
-	    set req.http.X-Forwarded-For = client.ip;
-	}
+        if (req.http.x-forwarded-for) {
+            set req.http.X-Forwarded-For =
+                req.http.X-Forwarded-For + ", " + client.ip;
+        } else {
+            set req.http.X-Forwarded-For = client.ip;
+        }
     }
     if (req.method != "GET" &&
       req.method != "HEAD" &&
@@ -104,13 +104,13 @@ sub vcl_purge {
 
 sub vcl_hit {
     if (obj.ttl >= 0s) {
-	// A pure unadultered hit, deliver it
-	return (deliver);
+        // A pure unadultered hit, deliver it
+        return (deliver);
     }
     if (obj.ttl + obj.grace > 0s) {
-	// Object is in grace, deliver it
-	// Automatically triggers a background fetch
-	return (deliver);
+        // Object is in grace, deliver it
+        // Automatically triggers a background fetch
+        return (deliver);
     }
     // fetch & deliver once we get the result
     return (fetch);
@@ -167,22 +167,22 @@ sub vcl_backend_fetch {
 
 sub vcl_backend_response {
     if (beresp.ttl <= 0s ||
-        beresp.http.Set-Cookie ||
-        beresp.http.Surrogate-control ~ "no-store" ||
-        (!beresp.http.Surrogate-Control &&
-          beresp.http.Cache-Control ~ "no-cache|no-store|private") ||
-        beresp.http.Vary == "*") {
-		/*
-		 * Mark as "Hit-For-Pass" for the next 2 minutes
-		 */
-		set beresp.ttl = 120s;
-		set beresp.uncacheable = true;
+      beresp.http.Set-Cookie ||
+      beresp.http.Surrogate-control ~ "no-store" ||
+      (!beresp.http.Surrogate-Control &&
+        beresp.http.Cache-Control ~ "no-cache|no-store|private") ||
+      beresp.http.Vary == "*") {
+        /*
+        * Mark as "Hit-For-Pass" for the next 2 minutes
+        */
+        set beresp.ttl = 120s;
+        set beresp.uncacheable = true;
     }
     return (deliver);
 }
 
 sub vcl_backend_error {
-	return (deliver);
+    return (deliver);
 }
 
 #######################################################################



More information about the varnish-commit mailing list