Skip to content

Commit

Permalink
Item14544: Undefined variable if headers missing
Browse files Browse the repository at this point in the history
  • Loading branch information
gac410 committed Dec 10, 2017
1 parent 4ecda68 commit b8511bb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion core/lib/Foswiki/Request.pm
Expand Up @@ -298,7 +298,10 @@ sub url {
$url = $Foswiki::cfg{DefaultUrlHost}; $url = $Foswiki::cfg{DefaultUrlHost};
} }
else { 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]; $vh = ( split /[, ]+/, $vh )[0];
$url = $url =
$vh $vh
Expand Down

0 comments on commit b8511bb

Please sign in to comment.