#32678 [Opn->Fbk]: An extra Line Feed ( 0x0A) is added when downloading Files
| From: | sniper@php.net | Date: | Mon, 11 Apr 2005 22:02:18 +0000 |
| Subject: | #32678 [Opn->Fbk]: An extra Line Feed ( 0x0A) is added when downloading Files | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-76666@lists.php.net to get a copy of this message | ||
ID: 32678
Updated by: sniper@php.net
Reported By: kosuri dot s dot raju at chase dot com
-Status: Open
+Status: Feedback
-Bug Type: Output Control
+Bug Type: iPlanet related
Operating System: Win 2000 (build 2195), SP4
PHP Version: 4.3.10
New Comment:
Please try using this CVS snapshot:
http://snaps.php.net/php5-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5-win32-latest.zip
Previous Comments:
------------------------------------------------------------------------
[2005-04-11 21:46:37] kosuri dot s dot raju at chase dot com
Description:
------------
Environment:
Windows 2000, V5.0.2195 SP 4
Sun one Webserver 6.1 SP2
PHP 4.3.10 (cgi-fcgi) (built: Dec 14 2004 17:47:59)
Using NSAPI
MySQL
Browser: IE6.0
When dowloading a file ( both text and Binary files ), an extra LF
Character (0x0A) is always prepende to the output. This is only
happening in the above environment. The data is stored properly on
the MySql Server. Works OK on Windows XP , SP2 ( environment)
Reproduce code:
---------------
Sample Code:
$inData = // Read Data from mySQL
$ctype = "text/plain" ; // or like appilcation/msword
header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Cache-Control: public");
header("Content-type: $ctype");
header( "Content-Disposition: attachment; filename=".$filenam );
header("Content-Transfer-Encoding: binary");
header("Content-Length: ".$filesize);
echo($inData);
exit;
Expected result:
----------------
The output should not contain additional LineFeed character at the
start of output
Actual result:
--------------
<LF> --- This is Extra Linefeed ( 0x0A)
BBBBB
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=32678&edit=1