18         if (!isset(
$headers[
'Content-Type'])) {
 
   19             $headers[
'Content-Type'] = 
'application/octet-stream; charset=utf-8';
 
   22         if (!isset(
$headers[
'Cache-Control'])) {
 
   23             $headers[
'Cache-Control'] = 
'no-store';
 
   26         if (!isset(
$headers[
'Content-Disposition'])) {
 
   27             $headers[
'Content-Disposition'] = 
'attachment';
 
   30         if (!empty($this->content) && !isset(
$headers[
'Content-Length'])) {
 
   31             $headers[
'Content-Length'] = strlen((
string) $this->content);
 
   55         if (isset($this->headers[
'Content-Disposition'])) {
 
   59         $disposition = $inline ? 
'inline' : 
'attachment';
 
   62             $disposition .= 
"; filename=\"{$filename}\"";
 
   65         $this->headers[
'Content-Disposition'] = $disposition;
 
Download response builder.
setFilename(string $filename='', bool $inline=false)
Set the filename for the download.
setForwardURL(string $forward_url=REFERRER)
{Sets redirect URL.Forward URL self }
getHeaders()
{Returns additional response headers.array}
const REFERRER
Used in calls to forward() to specify the browser should be redirected to the referring page.
if(parse_url(elgg_get_site_url(), PHP_URL_PATH) !=='/') if(file_exists(elgg_get_root_path() . 'robots.txt'))
Set robots.txt.