Fwd: perlbal fails on OSX
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > Perlbal > Fwd: perlbal fails on OSX




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Fwd: perlbal fails on OSX  
Chuck Remes


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
04-14-07 06: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);
>







[ Post a follow-up to this message ]



    Re: Fwd: perlbal fails on OSX  
Brad Fitzpatrick


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
04-17-07 12:12 AM

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:
> 
>
>






[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 05:54 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register