diff --git a/scripts/socket/FreeSWITCH/Client.pm b/scripts/socket/FreeSWITCH/Client.pm index 3902514249..3d7617ac33 100644 --- a/scripts/socket/FreeSWITCH/Client.pm +++ b/scripts/socket/FreeSWITCH/Client.pm @@ -67,6 +67,7 @@ sub readhash($;$) { } if ($h->{'content-length'}) { + if(! defined $h->{body}) { $h->{body}=0; } while(length($h->{body}) < $h->{'content-length'}) { my $buf; recv $s, $buf, $h->{'content-length'} - length($h->{body}), 0;