mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-08 07:24:21 +00:00
HttpUtils.pm: dump header on global verbose 5 (Forum #67511)
git-svn-id: https://svn.fhem.de/fhem/trunk@13471 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
c2ee5cb9bc
commit
e04cdcbf13
@ -400,6 +400,8 @@ HttpUtils_Connect2($)
|
||||
$hdr .= "Content-Type: application/x-www-form-urlencoded\r\n"
|
||||
if ($hdr !~ "Content-Type:");
|
||||
}
|
||||
Log3 $hash, 5, "HttpUtils request header:\n$hdr"
|
||||
if($attr{global}{verbose} >= 5);
|
||||
$hdr .= "\r\n";
|
||||
|
||||
my $s = $hash->{shutdown};
|
||||
@ -665,14 +667,8 @@ HttpUtils_ParseAnswer($)
|
||||
# Debug
|
||||
Log3 $hash, $hash->{loglevel},
|
||||
"HttpUtils $hash->{displayurl}: Got data, length: ". length($ret);
|
||||
if(!length($ret)) {
|
||||
Log3 $hash, $hash->{loglevel}, "HttpUtils $hash->{displayurl}: ".
|
||||
"Zero length data, header follows:";
|
||||
for (@header) {
|
||||
Log3 $hash, $hash->{loglevel}, " $_";
|
||||
}
|
||||
}
|
||||
|
||||
Log3 $hash, 5, "HttpUtils response header:\n$hash->{httpheader}"
|
||||
if($attr{global}{verbose} >= 5 && $hash->{httpheader});
|
||||
return ("", $ret);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user