From 4d1b9ffe3250a2d4f7c3ba9890443e321c0d8e8b Mon Sep 17 00:00:00 2001 From: Matt Simerson Date: Wed, 8 Jan 2014 16:10:38 -0800 Subject: [PATCH] headers: use a more descriptive variable name --- plugins/headers | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/headers b/plugins/headers index 4bdd275..d2c6f1d 100644 --- a/plugins/headers +++ b/plugins/headers @@ -196,20 +196,20 @@ sub invalid_date_range { my $date = shift || $self->transaction->header->get('Date') or return; chomp $date; - my $ts = str2time($date) or do { + my $msg_ts = str2time($date) or do { $self->log(LOGINFO, "skip, date not parseable ($date)"); return; }; my $past = $self->{_args}{past}; - if ($past && $ts < time - ($past * 24 * 3600)) { + if ($past && $msg_ts < time - ($past * 24 * 3600)) { $self->log(LOGINFO, "fail, date too old ($date)"); $self->adjust_karma(-1); return "The Date header is too far in the past"; } my $future = $self->{_args}{future}; - if ($future && $ts > time + ($future * 24 * 3600)) { + if ($future && $msg_ts > time + ($future * 24 * 3600)) { $self->log(LOGINFO, "fail, date in future ($date)"); $self->adjust_karma(-1); return "The Date header is too far in the future";