mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-02 00:48:53 +00:00
HttpUtils.pm: fix data for unicodeEncoding (Forum #131207)
git-svn-id: https://svn.fhem.de/fhem/trunk@26916 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
d7f5d4781b
commit
80d0f35ba5
@ -736,7 +736,10 @@ HttpUtils_Connect2($)
|
||||
}
|
||||
};
|
||||
|
||||
$data = $hdr.(defined($data) ? $data:"");
|
||||
$data = "" if(!defined($data));
|
||||
$data = Encode::decode("UTF-8", $data) if($unicodeEncoding);
|
||||
$data = $hdr.$data;
|
||||
|
||||
$hash->{directWriteFn} = sub($) { # Nonblocking write
|
||||
my $ret = syswrite $hash->{conn}, $data;
|
||||
if(!defined($ret) || $ret <= 0) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user