git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4358
d0543943-73ff-0310-b7d9-
9358b9ac24b2
if ($i eq "") {
$h->{socketerror} = "yes";
return $h;
- last;
} elsif ($i eq "\n") {
$crc++;
last;
}
$line .= $i;
}
+
if (!$line) {
last;
}
}
if ($h->{'content-length'}) {
- recv $s, $h->{body}, $h->{'content-length'}, 0;
+ while(length($h->{body}) < $h->{'content-length'}) {
+ my $buf;
+ recv $s, $buf, $h->{'content-length'}, 0;
+ if (!$buf) {
+ $h->{socketerror} = "yes";
+ return $h;
+ }
+ $h->{body} .= $buf;
+ }
}
if ($h->{'content-type'} eq "text/event-plain") {