forked from extern/egroupware
Add content length setting
This commit is contained in:
parent
fb487058fe
commit
bee99d173e
@ -221,7 +221,7 @@
|
||||
}
|
||||
|
||||
// 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)
|
||||
{
|
||||
@ -238,6 +238,11 @@
|
||||
header('Content-disposition:'.$attachment.' filename="'.$fn.'"');
|
||||
header('Content-type: '.$mime);
|
||||
|
||||
if ($length)
|
||||
{
|
||||
header("Content-length: ".$length);
|
||||
}
|
||||
|
||||
if ($nocache)
|
||||
{
|
||||
header('Pragma: no-cache');
|
||||
|
Loading…
Reference in New Issue
Block a user