From: Graham Knop Date: Tue, 27 Nov 2018 15:04:34 +0000 (+0100) Subject: stop throwing warnings when REMOTE_ADDR is undef X-Git-Tag: v5.90123~4 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=e840432040b3ff50ae772daec9327be08b55c2b7;hp=d2d007f49d5e9b06f0d1a6f38fc9ac8ac3306183 stop throwing warnings when REMOTE_ADDR is undef --- diff --git a/Changes b/Changes index 039abe0..c9534ca 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,6 @@ # This file documents the revision history for Perl extension Catalyst. + - Fix emitting warnings when REMOTE_ADDR is undefined (RT#113388) - Fix $c->req->hostname empty for IPv6 clients (RT#75731) 5.90122 - 2018-11-03 diff --git a/lib/Catalyst.pm b/lib/Catalyst.pm index 37e0af0..2258ae8 100644 --- a/lib/Catalyst.pm +++ b/lib/Catalyst.pm @@ -3467,7 +3467,7 @@ sub apply_default_middlewares { condition => sub { my ($env) = @_; return if $app->config->{ignore_frontend_proxy}; - return $env->{REMOTE_ADDR} eq '127.0.0.1'; + return $env->{REMOTE_ADDR} && $env->{REMOTE_ADDR} eq '127.0.0.1'; }, ); }