SA Bugzilla – Attachment #5733: exit when data has been read for bug #7183
return -1;
}
last if $numbytes == 0;
last if $red >= $expected_length;
$red += $numbytes;