[klone-users] issue with response_redirect after processing file download

moises acuna moises.acuna at gmail.com
Thu Nov 12 17:58:20 EST 2009


Hello
I've got this issue:
in the systemfilesdownload .kl1 file when the actual buffering is done

 size_t q_rb;
 char the_buf[1024];
 target = fopen("/tmp/file.dat", "rb");
  if(target == NULL){
     fr_setError(session, "Error downloading file. Download aborted!.Please
try again.");
      break;
     }
   while ((q_rb = fread(the_buf, 1, sizeof the_buf, target)) > 0)
                  (void) io_write(out, the_buf, q_rb);

   fr_setMessage(session, "Transfer executed successfully. File
downloaded!.");
   response_redirect(response, "systemfiles.kl1");  // ***


***: here the I would like to redirect to systemfiles.kl1 but it doesn't
     if I manually refresh the page the "Transfer executed succ..." message
is shown
     I need to redirect from the download page to show this message
    automatically (and othe stuff, like reenable some buttons) when the
download
    is complete.
  the download is executed fine , it's just the redirect.
  the io_write function changes the response values I think.
Has anyone had a problem similar to this?
Thanks in advanced.

Moisés




-- 
Moisés AAC
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://koanlogic.com/pipermail/klone-users/attachments/20091112/3aea2dbf/attachment.htm


More information about the klone-users mailing list