Bug #51723 [Bgs]: Content-length header is limited to 32bit integer
| From: | anatoli at adt dot ee | Date: | Sun, 02 May 2010 23:50:11 +0000 |
| Subject: | Bug #51723 [Bgs]: Content-length header is limited to 32bit integer | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-150107@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=51723&edit=1
ID: 51723
User updated by: anatoli at adt dot ee
Reported by: anatoli at adt dot ee
Summary: Content-length header is limited to 32bit integer
Status: Bogus
Type: Bug
Package: Apache2 related
Operating System: vista 32
PHP Version: 5.2.13
New Comment:
The problem is not in the filesize. Headers was checked with the latest
wireshark. Under the cgi i receive correct header. Under sapi not. Do i
must provide here code that allow downloads for files till 8Gb with
multiple threads and resume support, witch is working under unix cgi,
and not under win32 sapi? I redused test case to exactly minimum amount
of code needed to reproduce error.
Previous Comments:
------------------------------------------------------------------------
[2010-05-03 01:41:29] pajoye@php.net
The header is correctly sent without modification (you can verify that
using cgi in the console). However PHP does not support large file
support and only 2^31 bytes are read and sent.
There is already a feature request for LFS > mark this one as duplicated
(bogus).
------------------------------------------------------------------------
[2010-05-03 00:58:57] anatoli at adt dot ee
Description:
------------
Content-length header is limited to 32bit integer on wista 32 systems
under apache 2 sapi.
header("Content-Length: 2967901695");
Expected on client - Content-Length: 2967901695
Actual - Content-Length: 2147483647
Test script:
---------------
<?php
header($_SERVER['SERVER_PROTOCOL'].' 200 OK');
header('Accept-Ranges: bytes');
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename=test.txt');
header("Content-Transfer-Encoding: binary");
header("Content-Length: 2967901695");
header('Connection: close');
//we open file with size exactly 2967901695 bytes
$fp = fopen("somefile.name", 'rb');
fpassthru($fp);
?>
Expected result:
----------------
Content-Length: 2967901695
Actual result:
--------------
Content-Length: 2147483647
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=51723&edit=1