File download + HTTP auth problem.

From: Date: Tue, 05 Nov 2002 19:29:30 +0000
Subject: File download + HTTP auth problem.
Groups: php.general 
Request: Send a blank email to php-general+get-122847@lists.php.net to get a copy of this message
Hello, I have this simple script called index.php in a directory protected with HTTP auth (require valid-user): <?php $archivo = '/somewhere/out/docroot/registro.csv'; header('Content-Type: application/octect-stream'); header('Content-Length: '.filesize($archivo)); header('Content-Disposition: attachment; filename=registro.csv'); @readfile($archivo); ?> When I access the directory with Netscape/Mozilla/Galeon it works fine, Apache "asks" the login and password and the script sends the file. But with MSIE 6.x (from Windows XP) it does not work: it presents the download dialog asking to save or open the file, but then MSIE reports an error and does not download the file. I discovered later that Konqueror asks for the login and password again when the download starts. What could be causing this?. Thanks in advance. Rodolfo.

« previous php.general (#122847) next »