From 6f0c169c7d9e09d82572a56146a63ae42bd3b2ec Mon Sep 17 00:00:00 2001
From: Michael Jerris <mike@jerris.com>
Date: Tue, 11 Sep 2007 22:33:08 +0000
Subject: [PATCH] Fix for MODAPP-27 from Bret McDanel.

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5700 d0543943-73ff-0310-b7d9-9358b9ac24b2
---
 scripts/socket/FreeSWITCH/Client.pm | 1 +
 1 file changed, 1 insertion(+)

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;