[master] 76a050f Add .expected_response to probe documentation. Fix error message for .expected_response.

Andreas Plesner Jacobsen apj at varnish-cache.org
Fri Sep 9 14:56:30 CEST 2011


commit 76a050fd10b6ab423be673cce5ee12fda049356f
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