dynamic image bug

Bug report
Date: August 30, 2003
Version: Amaya 8.0

Amaya has a bug in rendering dynamically
generated images. If a web author creates a php script
that returns one of serveral png images, Amaya will
display the first image, but Amaya then caches 
the image and won't accept any new version
that the php script generates. For example,
take this PHP file:

-------------> imgrotate.php <-----------------

// Create the list of files to display. 
$imgfiles = array (

// rot.txt must already exist and be world writable. 
//    The file contains only a single number. 
$count = file('rot.txt');
$count = (intval($count[0]) + 1) % count($imgfiles);
`echo $count > rot.txt`;

$file = $imgfiles[$count];

header ('Content-Type: image/png');
header ('Cache-control: no-cache');
header ("X-Debug-Info: count=$count, file=$file");
passthru("cat $file");
-------------> end <---------------------
Put the address of this file into the location
bar and hit enter to go to the page. Each time
you click refresh, you get the same image. 

'imgrotate.php,' rotates over four png images. 
Because the content is always going to change, caching
is disabled in the HTTP header, but that does not 
disuade Amaya from caching the first file it gets

Amaya caches the image even if Amaya's cache
is disabled using the 'Settings/Cache...' dialog. 

By the way, the problem goes away when the
image file is loaded from another page
as part of an IMG tag. The bug is only seen when
the location bar is used to access the image
rotating script. 

Received on Sunday, 31 August 2003 12:23:50 UTC