Jelajahi Sumber

* Now someone over a dialup can download a large attachment (over 30 seconds)
without fear.

Tyler Akins 24 tahun lalu
induk
melakukan
65a2fb3184
1 mengubah file dengan 6 tambahan dan 0 penghapusan
  1. 6 0
      functions/mime.php

+ 6 - 0
functions/mime.php

@@ -412,10 +412,16 @@
       // 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;