|
Home > Archive > Perlbal > April 2007 > Fwd: perlbal fails on OSX
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Fwd: perlbal fails on OSX
|
|
| Chuck Remes 2007-04-14, 1:11 pm |
| Forwarded to the list in case this bites anyone else... this patch
works and now all tests pass.
cr
Begin forwarded message:
> From: Radu Greab <radu@yx.ro>
> Date: April 13, 2007 2:46:38 PM CDT
> To: cremes.devlist@mac.com
> Subject: Re: perlbal fails on OSX
>
>
> Hi,
>
>
> The above code assumes that the loop will be left when a reading
> from a
> closed socket is tried (errno will be set). May I ask you to try the
> change below, which will make the loop finish when EOF is read from
> the socket?
>
>
> === lib/Perlbal/Test.pm
> ========================================
==========================
> --- lib/Perlbal/Test.pm (revision 75559)
> +++ lib/Perlbal/Test.pm (local)
> @@ -189,9 +189,9 @@
> my $cl = $resp->header('Content-Length');
> if (defined $cl && $cl > 0) {
> my $content = '';
> - while (($cl -= read($sock, $content, $cl)) > 0) {
> - # assume an error means connection closed
> - last if $!;
> + my $rv;
> + while (($rv = read($sock, $content, $cl)) &&
> + ($cl -= $rv) > 0) {
> # don't do anything, the loop is it
> }
> $resp->content($content);
>
| |
| Brad Fitzpatrick 2007-04-16, 7:12 pm |
| Fix checked in. New release coming shortly...
On Sat, 14 Apr 2007, Chuck Remes wrote:
> Forwarded to the list in case this bites anyone else... this patch
> works and now all tests pass.
>
> cr
>
> Begin forwarded message:
>
>
>
|
|
|
|
|