perl-asp mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joshua Chamas <jos...@chamas.com>
Subject Re: FW: use script variables in cleanup code?
Date Wed, 13 Feb 2002 04:37:28 GMT
Tim Pushor wrote:
>
> So are you saying that if the user clicks the stop button on the
> browser, that the script will continue to execute?
>

Yes.  I do not know if it documented anywhere, but it seems to be
how mod_perl behaves.
 
> While (($rv=sysread(I,$buffer,$bufsz))!=0) {
> 
>         $Response->BinaryWrite($buffer);
> }
> $done=1;
> 

I might do something like:

  while(my $data = sysread()) {
    $Response->BinaryWrite($data);
    last unless $Response->{IsClientConnected};
  }
  if(! $Response->{IsClientConnected}) {
     # mark download not complete
  }

Note, I do not know that IsClientConnected gets marked
in a 100% reliable way.  There have been bug reports to the 
contrary in prior releases, so I would not base ecommerce type 
data based on its results.  If it ever seems to not provide 
the correct data, please report this bug & hopefully we can fix it.

--Josh

_________________________________________________________________
Joshua Chamas                           Chamas Enterprises Inc.
NodeWorks Founder                       Huntington Beach, CA  USA 
http://www.nodeworks.com                1-714-625-4051

---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe@perl.apache.org
For additional commands, e-mail: asp-help@perl.apache.org


Mime
View raw message