From: <se...@us...> - 2009-02-24 23:08:05
|
Revision: 16899 http://tikiwiki.svn.sourceforge.net/tikiwiki/?rev=16899&view=rev Author: sewilco Date: 2009-02-24 22:43:39 +0000 (Tue, 24 Feb 2009) Log Message: ----------- [FIX] Use different ETag for modified image than original image. Modified Paths: -------------- trunk/tiki-download_file.php Modified: trunk/tiki-download_file.php =================================================================== --- trunk/tiki-download_file.php 2009-02-24 19:22:00 UTC (rev 16898) +++ trunk/tiki-download_file.php 2009-02-24 22:43:39 UTC (rev 16899) @@ -169,7 +169,12 @@ } // ETag: Entity Tag used for strong cache validation. -$etag = '"' . $md5 . '-' . crc32($md5) . '"'; +if ( ! isset($_GET['display']) || isset($_GET['x']) || isset($_GET['y']) || isset($_GET['scale']) || isset($_GET['max']) || isset($_GET['format']) ) { + // if image will be modified, emit a different ETag for modifications. + $etag = '"' . $md5 . '-' . crc32($md5) . '-' . crc32( $_GET['x'] . 'x' . $_GET['y'] . 'y' . $_GET['scale'] . 's' . $_GET['max'] . 'm' . $_GET['format'] . 'f' ) . '"'; +} else { + $etag = '"' . $md5 . '-' . crc32($md5) . '"'; +} header('ETag: '.$etag); $use_client_cache = false; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |