[3.0] 1a80763 Add .expected_response to probe documentation. Fix error message for .expected_response.

Tollef Fog Heen tfheen at varnish-cache.org
Thu Sep 22 14:02:44 CEST 2011


commit 1a807636089475f0f0eaf50476fb3ded42bf355e
Author: Andreas Plesner Jacobsen <apj at marvin.nerd.dk>
Date:   Fri Sep 9 14:54:24 2011 +0200

    Add .expected_response to probe documentation.
    Fix error message for .expected_response.
    
    Fixes #997

diff --git a/doc/sphinx/reference/vcl.rst b/doc/sphinx/reference/vcl.rst
index 7359e6f..0e39187 100644
--- a/doc/sphinx/reference/vcl.rst
+++ b/doc/sphinx/reference/vcl.rst
@@ -284,7 +284,8 @@ req.backend.healthy .window is how many of the latest polls we
 examine, while .threshold is how many of those must have succeeded for
 us to consider the backend healthy.  .initial is how many of the
 probes are considered good when Varnish starts - defaults to the same
-amount as the threshold.
+amount as the threshold. .expected_response is the expected backend
+HTTP response code.
 
 A backend with a probe can be defined like this, together with the
 backend or director:::
@@ -310,6 +311,7 @@ Or it can be defined separately and then referenced:::
      .window = 8;
      .threshold = 3;
      .initial = 3;
+     .expected_response = 200;
   }	
 
   backend www {
diff --git a/lib/libvcl/vcc_backend.c b/lib/libvcl/vcc_backend.c
index 1b8f8a0..f79447f 100644
--- a/lib/libvcl/vcc_backend.c
+++ b/lib/libvcl/vcc_backend.c
@@ -305,8 +305,9 @@ vcc_ParseProbeSpec(struct vcc *tl)
 			status = vcc_UintVal(tl);
 			if (status < 100 || status > 999) {
 				VSB_printf(tl->sb,
-				    "Must specify .status with exactly three "
-				    " digits (100 <= x <= 999)\n");
+				    "Must specify .expected_response with "
+				    "exactly three digits "
+				    "(100 <= x <= 999)\n");
 				vcc_ErrWhere(tl, tl->t);
 				return;
 			}



More information about the varnish-commit mailing list