lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

lynx-dev bug: refresh and images


From: Carlton Anderson
Subject: lynx-dev bug: refresh and images
Date: Sun, 31 Aug 2003 09:31:32 -0500 (GMT)

Bug report
Date: August 31, 2003
Version: Lynx 2.8.5dev16

Lynx has a bug in dealing with dynamically
generated images. If a web author creates
a PHP file that outputs an image, and if
that PHP script uses an HTTP refresh line
in the HTTP header, Lynx prepends the image
binary with words like this:

Refresh: 5 seconds <a href="http://localhost/index.html";>
http://localhost/index.html</a><br>

Since this information is prepended to the
image data, the image is essentially ruined. 
Here is an example:

<?php
error_reporting(E_ALL);

$svr = & $HTTP_SERVER_VARS;
header('Content-Type: image/png');
header('Content-Disposition: attachment; filename=afile.bin');
header("Refresh: 5; URL=http://$svr[HTTP_HOST]/index.html";);
passthru('cat ../homeimage.png');
?>

This is a bug. A better behavior for Lynx would be
for it to prepend the text only when the HTTP body
is of type text/html. 


; To UNSUBSCRIBE: Send "unsubscribe lynx-dev" to address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]