Bug #13254 Updated: Canceld downloaded will end up in browserwindow

From: Date: Fri, 19 Oct 2001 15:09:05 +0000
Subject: Bug #13254 Updated: Canceld downloaded will end up in browserwindow
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-68416@lists.php.net to get a copy of this message
ID: 13254 Updated by: sander Reported By: php@lucard.to Old Status: Open Status: Bogus Bug Type: Output Control Operating System: Slackware 8.0 PHP Version: 4.0.6 New Comment: Unlikely to be a bug in PHP. Unable to reproduce. -> bogus. Previous Comments: ------------------------------------------------------------------------ [2001-09-12 03:09:49] php@lucard.to I tested it on 4 different clients same server. 2 give the same problem 2 work perfectly.... Maybe a browser problem? ------------------------------------------------------------------------ [2001-09-11 17:11:21] php@lucard.to I made a script to start a download of a picture, when u cancel the download and refresh the parent the binary data of the download is displayed in the browser window. How to reproduce: - call the script below from a simple HTML page. - Cancel the download - refresh the HTML page Then you will see the binary data of the image ($file). So the $file must be a valid image. http://lucard.no-ip.com/hety/1.php <-- for demo 1.php is the simple html file.... <? $file="images/dscf0009.jpg"; $fp=@fopen($file,"r"); header("Content-Type: application/force-download"); header("Content-Length: " .filesize($file)); if(preg_match("/MSIE 5.5/", $HTTP_USER_AGENT)) { header("Content-Disposition: filename=\"".$file ."\""); } else { header("Content-Disposition: attachment; filename=\"".$file ."\""); } header("Content-Transfer-Encoding: binary"); fpassthru($fp); die(); ?> ------------------------------------------------------------------------ Edit this bug report at http://bugs.php.net/?id=13254&edit=1

« previous php.dev (#68416) next »