* Now someone over a dialup can download a large attachment (over 30 seconds)
authorfidian <fidian@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Fri, 11 May 2001 13:55:53 +0000 (13:55 +0000)
committerfidian <fidian@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Fri, 11 May 2001 13:55:53 +0000 (13:55 +0000)
  without fear.

git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@1358 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/mime.php

index 3b684a9edb8dd4c185d48c0f07ca6f82ae1a01c8..b40a1c26ee53c78ddad3dae1652714fd2757e848 100644 (file)
       // that it is the first one.  That is usually the case anyway.
       if (!$ent_id) $ent_id = 1;
 
+      // Don't kill the connection if the browser is over a dialup
+      // and it would take over 30 seconds to download it.
+      set_time_limit(0);
+      
       fputs ($imap_stream, "a001 FETCH $id BODY[$ent_id]\r\n");
          $cnt = 0;
          $continue = true;
                $read = fgets ($imap_stream,4096);
+               // This could be bad -- if the section has 'a001 OK'
+               // or similar, it will kill the download.
                while (!ereg("^a001 (OK|BAD|NO)(.*)$", $read, $regs)) {
                        if (trim($read) == ")==") {
                                $read1 = $read;