mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-25 23:39:09 +01:00
Add content length setting
This commit is contained in:
parent
fb487058fe
commit
bee99d173e
@ -221,7 +221,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Echo content headers for file downloads
|
// Echo content headers for file downloads
|
||||||
function content_header($fn="",$mime="application/octetstream",$nocache=True)
|
function content_header($fn="",$mime="application/octetstream",$length="",$nocache=True)
|
||||||
{
|
{
|
||||||
if ($fn)
|
if ($fn)
|
||||||
{
|
{
|
||||||
@ -238,6 +238,11 @@
|
|||||||
header('Content-disposition:'.$attachment.' filename="'.$fn.'"');
|
header('Content-disposition:'.$attachment.' filename="'.$fn.'"');
|
||||||
header('Content-type: '.$mime);
|
header('Content-type: '.$mime);
|
||||||
|
|
||||||
|
if ($length)
|
||||||
|
{
|
||||||
|
header("Content-length: ".$length);
|
||||||
|
}
|
||||||
|
|
||||||
if ($nocache)
|
if ($nocache)
|
||||||
{
|
{
|
||||||
header('Pragma: no-cache');
|
header('Pragma: no-cache');
|
||||||
|
Loading…
Reference in New Issue
Block a user