Permalink
Browse files

Item14544: Undefined variable if headers missing

  • Loading branch information...
gac410 committed Dec 10, 2017
1 parent 4ecda68 commit b8511bbae77b6e82591b0cf5faa31424d136ae43
Showing with 4 additions and 1 deletion.
  1. +4 −1 core/lib/Foswiki/Request.pm
@@ -298,7 +298,10 @@ sub url {
$url = $Foswiki::cfg{DefaultUrlHost};
}
else {
my $vh = $this->header('X-Forwarded-Host') || $this->header('Host');
my $vh =
$this->header('X-Forwarded-Host')
|| $this->header('Host')
|| '';
$vh = ( split /[, ]+/, $vh )[0];
$url =
$vh

0 comments on commit b8511bb

Please sign in to comment.