Loading ...
Sorry, an error occurred while loading the content.

151Re: FW: use script variables in cleanup code?

Expand Messages
  • Joshua Chamas
    Feb 12, 2002
      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()) {
      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.


      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@...
      For additional commands, e-mail: asp-help@...
    • Show all 2 messages in this topic