From 64f1f65771443fb57117f224307f2bd832e65135 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Wed, 26 Sep 2007 15:25:26 +0000 Subject: [PATCH] init to a blank string not to 0 cos that 0 is cast to a string in this case and causes an off by 1 git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5761 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- scripts/socket/FreeSWITCH/Client.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/socket/FreeSWITCH/Client.pm b/scripts/socket/FreeSWITCH/Client.pm index 3d7617ac33..3878686f1a 100644 --- a/scripts/socket/FreeSWITCH/Client.pm +++ b/scripts/socket/FreeSWITCH/Client.pm @@ -67,7 +67,7 @@ sub readhash($;$) { } if ($h->{'content-length'}) { - if(! defined $h->{body}) { $h->{body}=0; } + if(! defined $h->{body}) { $h->{body} = ""; } while(length($h->{body}) < $h->{'content-length'}) { my $buf; recv $s, $buf, $h->{'content-length'} - length($h->{body}), 0;