mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-20 13:26:02 +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"
|
$hdr .= "Content-Type: application/x-www-form-urlencoded\r\n"
|
||||||
if ($hdr !~ "Content-Type:");
|
if ($hdr !~ "Content-Type:");
|
||||||
}
|
}
|
||||||
|
Log3 $hash, 5, "HttpUtils request header:\n$hdr"
|
||||||
|
if($attr{global}{verbose} >= 5);
|
||||||
$hdr .= "\r\n";
|
$hdr .= "\r\n";
|
||||||
|
|
||||||
my $s = $hash->{shutdown};
|
my $s = $hash->{shutdown};
|
||||||
@ -665,14 +667,8 @@ HttpUtils_ParseAnswer($)
|
|||||||
# Debug
|
# Debug
|
||||||
Log3 $hash, $hash->{loglevel},
|
Log3 $hash, $hash->{loglevel},
|
||||||
"HttpUtils $hash->{displayurl}: Got data, length: ". length($ret);
|
"HttpUtils $hash->{displayurl}: Got data, length: ". length($ret);
|
||||||
if(!length($ret)) {
|
Log3 $hash, 5, "HttpUtils response header:\n$hash->{httpheader}"
|
||||||
Log3 $hash, $hash->{loglevel}, "HttpUtils $hash->{displayurl}: ".
|
if($attr{global}{verbose} >= 5 && $hash->{httpheader});
|
||||||
"Zero length data, header follows:";
|
|
||||||
for (@header) {
|
|
||||||
Log3 $hash, $hash->{loglevel}, " $_";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return ("", $ret);
|
return ("", $ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user