mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-10 09:16:53 +00:00
HttpUtils.pm: evaluate http header values if enclosed in {} (Forum 111959)
git-svn-id: https://svn.fhem.de/fhem/trunk@27255 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
d0a2c56861
commit
8afe5443f9
@ -659,7 +659,12 @@ HttpUtils_Connect2($)
|
||||
if(defined($hash->{header})) {
|
||||
if( ref($hash->{header}) eq 'HASH' ) {
|
||||
$hash->{header} = join("\r\n",
|
||||
map(($_.': '.$hash->{header}{$_}), keys %{$hash->{header}}));
|
||||
map { my $v = $hash->{header}{$_};
|
||||
if($v =~ m/^{.+}$/){ #111959
|
||||
$v = eval $v;
|
||||
Log3 $hash, 1, "$hash->{NAME} httpHeader $v: $@" if($@);
|
||||
}
|
||||
"$_: $v" } keys %{$hash->{header}});
|
||||
}
|
||||
}
|
||||
|
||||
@ -1052,7 +1057,7 @@ HttpUtils_ParseAnswer($)
|
||||
# compress(1)
|
||||
# data("") # sending data via POST
|
||||
# forceEncoding(undef) # Encode received data with this charset
|
||||
# header("" or {})
|
||||
# header("" or {}) # in the {} form value is evaluated if enclosed in {}
|
||||
# hideurl(0) # hide the url in the logs
|
||||
# httpversion("1.0")
|
||||
# ignoreredirects(0)
|
||||
|
Loading…
x
Reference in New Issue
Block a user