From f3e27df9021d2ba92b54cb9e8a82c66336a477e8 Mon Sep 17 00:00:00 2001 From: Niko Tyni Date: Thu, 13 Dec 2007 11:48:09 +0000 Subject: EchoPingHttp: add the 'accept_redirects' option --- lib/Smokeping/probes/EchoPingHttp.pm | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'lib/Smokeping') 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 => < 'yes', + }, }); } -- cgit v1.2.3-24-g4f1b