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

Re: FW: use script variables in cleanup code?

Expand Messages
  • Joshua Chamas
    ... Yes. I do not know if it documented anywhere, but it seems to be how mod_perl behaves. ... I might do something like: while(my $data = sysread()) {
    Message 1 of 2 , Feb 12, 2002
    • 0 Attachment
      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@...
      For additional commands, e-mail: asp-help@...
    Your message has been successfully submitted and would be delivered to recipients shortly.