PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » HTTP » HTTP_Download » Bug #2708

Last-modified date not applied

Details

Submitted2004-11-06 23:46 UTC
Fromallixsenos at gmail dot com
StatusBogus
PackageHTTP_Download
PHP Version4.3.8
OSLinux
Roadmaps(Not assigned)

Comments

[2004-11-06 23:46 UTC] allixsenos at gmail dot com

Description:
------------
I set the lastmodified property, but it's not shown in the headers.

Reproduce code:
---------------
if (file_exists($pathname))
{
$download_size = filesize($pathname);
$download_mtime = filemtime($pathname);

$params = array(
'file' => $pathname,
'contenttype' => 'application/zip',
'lastmodified' => $download_mtime,
'contentdisposition' => array(HTTP_DOWNLOAD_ATTACHMENT, $filename),
);

header("Content-Length: $download_size");

$error = HTTP_Download::staticSend($paramszip, false);
}

Expected result:
----------------
Last-modified header should be set to $download_mtime which (when read with var_dump) reads int(1099750434)

Actual result:
--------------
Last-Modified: Thu, 01 Jan 1970 00:00:00 GMT

(as noted in the raw GetRight download log)