Changeset 500 in subversion
- Timestamp:
- Mar 1, 2007 3:40:00 PM (6 years ago)
- Location:
- trunk/roundcubemail
- Files:
-
- 5 edited
-
CHANGELOG (modified) (1 diff)
-
index.php (modified) (3 diffs)
-
program/include/main.inc (modified) (2 diffs)
-
program/include/rcube_shared.inc (modified) (1 diff)
-
program/steps/mail/show.inc (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/roundcubemail/CHANGELOG
r498 r500 1 1 CHANGELOG RoundCube Webmail 2 2 --------------------------- 3 4 2007/03/01 (thomasb) 5 ---------- 6 - Solved page caching of message preview (closes #1484153) 7 - Only use gzip compression if configured (closes #1484236) 8 3 9 4 10 2007/02/25 (estadtherr) -
trunk/roundcubemail/index.php
r414 r500 3 3 +-----------------------------------------------------------------------+ 4 4 | RoundCube Webmail IMAP Client | 5 | Version 0.1-200 61206|6 | | 7 | Copyright (C) 2005-200 6, RoundCube Dev. - Switzerland |5 | Version 0.1-20070301 | 6 | | 7 | Copyright (C) 2005-2007, RoundCube Dev. - Switzerland | 8 8 | Licensed under the GNU GPL | 9 9 | | … … 41 41 */ 42 42 43 define('RCMAIL_VERSION', '0.1-200 61206');43 define('RCMAIL_VERSION', '0.1-20070301'); 44 44 45 45 // define global vars … … 107 107 { 108 108 // use gzip compression if supported 109 if (function_exists('ob_gzhandler') && !ini_get('zlib.output_compression'))109 if (function_exists('ob_gzhandler') && ini_get('zlib.output_compression')) 110 110 ob_start('ob_gzhandler'); 111 111 else -
trunk/roundcubemail/program/include/main.inc
r491 r500 191 191 } 192 192 193 if (!$valid)194 write_log('timeouts',195 "REQUEST: " . var_export($_REQUEST, true) .196 "\nEXPECTED: " . rcmail_auth_hash(session_id(), $_SESSION['auth_time']) .197 "\nOR LAST: " . rcmail_auth_hash(session_id(), $_SESSION['last_auth']) .198 "\nSESSION: " . var_export($_SESSION, true));199 200 193 return $valid; 201 194 } … … 560 553 $_SESSION['user_lang'] = $sess_user_lang; 561 554 $_SESSION['password'] = encrypt_passwd($pass); 555 $_SESSION['login_time'] = mktime(); 562 556 563 557 // force reloading complete list of subscribed mailboxes -
trunk/roundcubemail/program/include/rcube_shared.inc
r497 r500 1217 1217 1218 1218 // send header with expire date 30 days in future 1219 function send_future_expire_header( )1219 function send_future_expire_header($offset=2600000) 1220 1220 { 1221 1221 if (headers_sent()) 1222 1222 return; 1223 1223 1224 header("Expires: ".gmdate("D, d M Y H:i:s", mktime()+ 2600000)." GMT");1225 header("Cache-Control: ");1224 header("Expires: ".gmdate("D, d M Y H:i:s", mktime()+$offset)." GMT"); 1225 header("Cache-Control: max-age=$offset"); 1226 1226 header("Pragma: "); 1227 1227 } 1228 1229 1230 // check request for If-Modified-Since and send an according response 1231 function send_modified_header($mdate, $etag=null) 1232 { 1233 if (headers_sent()) 1234 return; 1235 1236 $iscached = false; 1237 if ($_SERVER['HTTP_IF_MODIFIED_SINCE'] && strtotime($_SERVER['HTTP_IF_MODIFIED_SINCE']) >= $mdate) 1238 $iscached = true; 1239 1240 $etag = $etag ? "\"$etag\"" : null; 1241 if ($etag && $_SERVER['HTTP_IF_NONE_MATCH'] == $etag) 1242 $iscached = true; 1243 1244 if ($iscached) 1245 header("HTTP/1.x 304 Not Modified"); 1246 else 1247 header("Last-Modified: ".gmdate("D, d M Y H:i:s", $mdate)." GMT"); 1248 1249 header("Cache-Control: max-age=0"); 1250 header("Expires: "); 1251 header("Pragma: "); 1252 1253 if ($etag) 1254 header("Etag: $etag"); 1255 1256 if ($iscached) 1257 exit; 1258 } 1228 1259 1229 1260 -
trunk/roundcubemail/program/steps/mail/show.inc
r483 r500 24 24 $PRINT_MODE = $_action=='print' ? TRUE : FALSE; 25 25 26 // allow caching, unless remote images are present27 if ((bool)get_input_value('_safe', RCUBE_INPUT_GET))28 send_nocacheing_headers();29 else30 send_future_expire_header();31 32 26 // similar code as in program/steps/mail/get.inc 33 27 if ($_GET['_uid']) … … 35 29 $MESSAGE = array('UID' => get_input_value('_uid', RCUBE_INPUT_GET)); 36 30 $MESSAGE['headers'] = $IMAP->get_headers($MESSAGE['UID']); 37 $MESSAGE['structure'] = $IMAP->get_structure($MESSAGE['UID']);38 31 39 32 // go back to list if message not found (wrong UID) 40 if (!$MESSAGE['headers'] || !$MESSAGE['structure'])33 if (!$MESSAGE['headers']) 41 34 { 42 35 show_message('messageopenerror', 'error'); … … 50 43 } 51 44 45 // calculate Etag for this request 46 $etag = md5($MESSAGE['UID'].$IMAP->get_mailbox_name().session_id().($PRINT_MODE?1:0)); 47 48 // allow caching, unless remote images are present 49 if ((bool)get_input_value('_safe', RCUBE_INPUT_GET)) 50 send_nocacheing_headers(); 51 else 52 send_modified_header($_SESSION['login_time'], $etag); 53 54 52 55 $MESSAGE['subject'] = $IMAP->decode_header($MESSAGE['headers']->subject); 53 56 54 if ($MESSAGE['structure'] )57 if ($MESSAGE['structure'] = $IMAP->get_structure($MESSAGE['UID'])) 55 58 list($MESSAGE['parts'], $MESSAGE['attachments']) = rcmail_parse_message( 56 59 $MESSAGE['structure'],
Note: See TracChangeset
for help on using the changeset viewer.
