From:             uwe dot beier at zf dot com
Operating system: WinXP Prof.
PHP version:      4.3.3
PHP Bug Type:     IIS related
Bug description:  Filesize of downloaded file larger then the original file size

Description:
------------
while downloading a file with the header function, the size of the
downloaded file is between 100 and 1000 bytes larger, than the original
file on the server. 
PHP version is 4.3.3 and Webserver is IIS 5.0 (OS: WinXP). The same
problem occured with PHP 4.3.2 on an Apache 1.3.28 and was fixed by
updating PHP to version 4.3.3

There are no blank lines after the last line and there are no include
files or auto_prepend files.

Reproduce code:
---------------
<?PHP
  $name="E:/ftpx/test/20031013_standards_proe.tgz";
  $save_as_name = basename($name);

  header("Cache-control: private");
  header("Content-Type: application/octet-stream");
  header("Content-Disposition: filename=$save_as_name");
  header("Content-Transfer-Encoding: binary");
  header("Content-length: " . filesize($name));
  header("Pragma: public");
  echo readfile($name);
?>

Expected result:
----------------
the original size is 158.994.464 Bytes, the downloaded file has
158.994.600 Bytes.


-- 
Edit bug report at http://bugs.php.net/?id=26094&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=26094&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=26094&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=26094&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=26094&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=26094&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=26094&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=26094&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=26094&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=26094&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=26094&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=26094&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26094&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=26094&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=26094&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=26094&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=26094&r=float

Reply via email to