summaryrefslogtreecommitdiffstats
path: root/lib/Smokeping/probes
diff options
context:
space:
mode:
authorNiko Tyni <ntyni@iki.fi>2007-12-13 12:48:09 +0100
committerNiko Tyni <ntyni@iki.fi>2007-12-13 12:48:09 +0100
commitf3e27df9021d2ba92b54cb9e8a82c66336a477e8 (patch)
tree7328794d9ab51ee611e6a8ca9687c785bc07d009 /lib/Smokeping/probes
parent7362792c380114c774fd01120c978360e81360d3 (diff)
downloadsmokeping-f3e27df9021d2ba92b54cb9e8a82c66336a477e8.tar.gz
smokeping-f3e27df9021d2ba92b54cb9e8a82c66336a477e8.tar.xz
EchoPingHttp: add the 'accept_redirects' option
Diffstat (limited to 'lib/Smokeping/probes')
-rw-r--r--lib/Smokeping/probes/EchoPingHttp.pm17
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/Smokeping/probes/EchoPingHttp.pm b/lib/Smokeping/probes/EchoPingHttp.pm
index 1281a39..3cbbb71 100644
--- a/lib/Smokeping/probes/EchoPingHttp.pm
+++ b/lib/Smokeping/probes/EchoPingHttp.pm
@@ -81,6 +81,13 @@ sub proto_args {
and $revalidate ne "0");
push @args, "-a" if $revalidate and not exists $self->{_disabled}{a};
+ # -R : accept HTTP redirects
+ my $accept_redirects = $target->{vars}{accept_redirects};
+ $accept_redirects= 1 if (defined $accept_redirects
+ and $accept_redirects ne "no"
+ and $accept_redirects ne "0");
+ push @args, "-R" if $accept_redirects;
+
return @args;
}
@@ -123,6 +130,16 @@ server. Enabled if the value is anything other than 'no' or '0'.
DOC
_example => 'no',
},
+ accept_redirects => {
+ _doc => <<DOC,
+The echoping(1) "-R" option: Accept HTTP status codes 3xx (redirections)
+as normal responses instead of treating them as errors. Note that this option
+is only available starting with Echoping 6.
+
+Enabled if the value is anything other than 'no' or '0'.
+DOC
+ _example => 'yes',
+ },
});
}