From 1d1e02f4e7829dd72317f6102076cc9609639bff Mon Sep 17 00:00:00 2001 From: fidian Date: Fri, 11 May 2001 13:55:53 +0000 Subject: [PATCH] * Now someone over a dialup can download a large attachment (over 30 seconds) without fear. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@1358 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/mime.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/functions/mime.php b/functions/mime.php index 3b684a9e..b40a1c26 100644 --- a/functions/mime.php +++ b/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; -- 2.25.1