forked from Mirrors/freeswitch
fix Client.pm recv len
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4370 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
6b46843c57
commit
10b1187110
|
@ -69,7 +69,7 @@ sub readhash($;$) {
|
||||||
if ($h->{'content-length'}) {
|
if ($h->{'content-length'}) {
|
||||||
while(length($h->{body}) < $h->{'content-length'}) {
|
while(length($h->{body}) < $h->{'content-length'}) {
|
||||||
my $buf;
|
my $buf;
|
||||||
recv $s, $buf, $h->{'content-length'}, 0;
|
recv $s, $buf, $h->{'content-length'} - length($h->{body}), 0;
|
||||||
if (!$buf) {
|
if (!$buf) {
|
||||||
$h->{socketerror} = "yes";
|
$h->{socketerror} = "yes";
|
||||||
return $h;
|
return $h;
|
||||||
|
|
Loading…
Reference in New Issue