From 93456766471df21b98b8c00db4260e457f8efc48 Mon Sep 17 00:00:00 2001 From: Greg Sabino Mullane Date: Tue, 4 Jan 2011 10:53:11 -0500 Subject: [PATCH] Add cache-busting for the version-grabbing utilities. Move the non-cache-busting methods to lower priorities. Per mailing list post from Aleksey Tsaloli --- META.yml | 4 ++-- Makefile.PL | 2 +- check_postgres.pl | 14 +++++++++----- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/META.yml b/META.yml index 1a5270664..ac9888821 100644 --- a/META.yml +++ b/META.yml @@ -1,6 +1,6 @@ --- #YAML:1.0 name : check_postgres.pl -version : 2.15.4 +version : 2.15.5 abstract : Postgres monitoring script author: - Greg Sabino Mullane @@ -30,7 +30,7 @@ recommends: provides: check_postgres: file : check_postgres.pl - version : 2.15.4 + version : 2.15.5 keywords: - Postgres diff --git a/Makefile.PL b/Makefile.PL index 867cf10dc..b3840fbc4 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -6,7 +6,7 @@ use strict; use warnings; use 5.006001; -my $VERSION = '2.15.4'; +my $VERSION = '2.15.5'; if ($VERSION =~ /_/) { print "WARNING! This is a test version ($VERSION) and should not be used in production!\n"; diff --git a/check_postgres.pl b/check_postgres.pl index be1ba1c53..f8e6bada3 100755 --- a/check_postgres.pl +++ b/check_postgres.pl @@ -30,7 +30,7 @@ $Data::Dumper::Varname = 'POSTGRES'; $Data::Dumper::Indent = 2; $Data::Dumper::Useqq = 1; -our $VERSION = '2.15.4'; +our $VERSION = '2.15.5'; use vars qw/ %opt $PSQL $res $COM $SQL $db /; @@ -68,10 +68,10 @@ our $YELLNAME = 1; ## Preferred order of ways to fetch pages for new_version checks our $get_method_timeout = 30; our @get_methods = ( - "GET -t $get_method_timeout", - "wget --quiet --timeout=$get_method_timeout -O -", + "GET -t $get_method_timeout -H 'Pragma: no-cache'", + "wget --quiet --timeout=$get_method_timeout --no-cache -O -", + "curl --silent --max-time=$get_method_timeout -H 'Pragma: no-cache'", "fetch -q -T $get_method_timeout -o -", - "curl --silent --max-time=$get_method_timeout", "lynx --connect-timeout=$get_method_timeout --dump", 'links -dump', ); @@ -7200,7 +7200,7 @@ sub check_archive_ready { B - a Postgres monitoring script for Nagios, MRTG, Cacti, and others -This documents describes check_postgres.pl version 2.15.4 +This documents describes check_postgres.pl version 2.15.5 =head1 SYNOPSIS @@ -8780,6 +8780,10 @@ Items not specifically attributed are by Greg Sabino Mullane. =over 4 +=item B + + Add cache-busting for the version-grabbing utilities. + =item B January 3, 2011 Fix warning when using symlinks -- 2.39.5