HttpUtils.pm: do not append empty header (Forum #44589)

git-svn-id: https://svn.fhem.de/fhem/trunk@9997 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig
2015-11-24 19:16:33 +00:00
parent 6db34bc138
commit fc341c640b

View File

@@ -264,7 +264,7 @@ HttpUtils_Connect2($)
if(defined($hash->{auth}) &&
!($hash->{header} &&
$hash->{header} =~ /^Authorization:\s*Digest/mi));
$hdr .= $hash->{header}."\r\n" if(defined($hash->{header}));
$hdr .= $hash->{header}."\r\n" if($hash->{header});
if(defined($data)) {
$hdr .= "Content-Length: ".length($data)."\r\n";
$hdr .= "Content-Type: application/x-www-form-urlencoded\r\n"