use correct (or at least official) capitalisation on Content-Disposition

This commit is contained in:
zotlabs 2020-03-04 14:45:58 -08:00
parent 685200c53b
commit 570832dd48
11 changed files with 13 additions and 13 deletions

View file

@ -38,7 +38,7 @@ class Attach extends \Zotlabs\Web\Controller {
header('Content-type: ' . $r['data']['filetype']);
}
header('Content-disposition: attachment; filename="' . $r['data']['filename'] . '"');
header('Content-Disposition: attachment; filename="' . $r['data']['filename'] . '"');
if(intval($r['data']['os_storage'])) {
$fname = dbunescbin($r['data']['content']);
if(strpos($fname,'store') !== false)

View file

@ -249,7 +249,7 @@ class Calendar extends Controller {
);
if ($r) {
header('Content-type: text/calendar');
header('content-disposition: attachment; filename="' . t('event') . '-' . $event_id . '.ics"' );
header('Content-Disposition: attachment; filename="' . t('event') . '-' . $event_id . '.ics"' );
echo ical_wrapper($r);
killme();
}
@ -446,7 +446,7 @@ class Calendar extends Controller {
if ($export) {
header('Content-type: text/calendar');
header('content-disposition: attachment; filename="' . t('calendar') . '-' . $channel['channel_address'] . '.ics"' );
header('Content-Disposition: attachment; filename="' . t('calendar') . '-' . $channel['channel_address'] . '.ics"' );
echo ical_wrapper($r);
killme();
}

View file

@ -281,7 +281,7 @@ class Events extends Controller {
);
if($r) {
header('Content-type: text/calendar');
header('content-disposition: attachment; filename="' . t('event') . '-' . $event_id . '.ics"' );
header('Content-Disposition: attachment; filename="' . t('event') . '-' . $event_id . '.ics"' );
echo ical_wrapper($r);
killme();
}
@ -705,7 +705,7 @@ class Events extends Controller {
if($export) {
header('Content-type: text/calendar');
header('content-disposition: attachment; filename="' . t('calendar') . '-' . $channel['channel_address'] . '.ics"' );
header('Content-Disposition: attachment; filename="' . t('calendar') . '-' . $channel['channel_address'] . '.ics"' );
echo ical_wrapper($r);
killme();
}

View file

@ -136,7 +136,7 @@ class Getfile extends Controller {
header('Content-type: ' . $r['data']['filetype']);
}
header('Content-disposition: attachment; filename="' . $r['data']['filename'] . '"');
header('Content-Disposition: attachment; filename="' . $r['data']['filename'] . '"');
if(intval($r['data']['os_storage'])) {
$fname = dbunescbin($r['data']['content']);
if(strpos($fname,'store') !== false)

View file

@ -109,7 +109,7 @@ class Layouts extends Controller {
);
if($r) {
header('Content-type: application/x-hubzilla-layout');
header('Content-disposition: attachment; filename="' . $r[0]['sid'] . '.pdl"');
header('Content-Disposition: attachment; filename="' . $r[0]['sid'] . '.pdl"');
echo json_encode($r);
killme();
}

View file

@ -128,7 +128,7 @@ class Profile extends \Zotlabs\Web\Controller {
if(argc() > 2 && argv(2) === 'vcard') {
header('Content-type: text/vcard');
header('content-disposition: attachment; filename="' . t('vcard') . '-' . $profile['channel_address'] . '.vcf"' );
header('Content-Disposition: attachment; filename="' . t('vcard') . '-' . $profile['channel_address'] . '.vcf"' );
echo \App::$profile['profile_vcard'];
killme();
}

View file

@ -152,7 +152,7 @@ class Profiles extends Controller {
return;
}
header('content-type: application/octet_stream');
header('content-disposition: attachment; filename="' . $r1[0]['profile_name'] . '.json"' );
header('Content-Disposition: attachment; filename="' . $r1[0]['profile_name'] . '.json"' );
unset($r1[0]['id']);
unset($r1[0]['aid']);

View file

@ -26,7 +26,7 @@ class Uexport extends Controller {
}
header('content-type: application/json');
header('content-disposition: attachment; filename="' . $channel['channel_address'] . (($year) ? '-' . $year : '') . (($month) ? '-' . $month : '') . (($_REQUEST['sections']) ? '-' . $_REQUEST['sections'] : '') . '.json"' );
header('Content-Disposition: attachment; filename="' . $channel['channel_address'] . (($year) ? '-' . $year : '') . (($month) ? '-' . $month : '') . (($_REQUEST['sections']) ? '-' . $_REQUEST['sections'] : '') . '.json"' );
if ($year) {
echo json_encode(identity_export_year(local_channel(),$year,$month));

View file

@ -42,7 +42,7 @@ class Viewsrc extends Controller {
if ($dload) {
header('Content-type: ' . $r[0]['mimetype']);
header('Content-disposition: attachment; filename="' . t('item') . '-' . $item_id . '"' );
header('Content-Disposition: attachment; filename="' . t('item') . '-' . $item_id . '"' );
echo $r[0]['body'];
killme();
}

View file

@ -675,7 +675,7 @@ class Webpages extends Controller {
// Generate the zip file
ExtendedZip::zipTree($tmp_folderpath, $zip_filepath, ZipArchive::CREATE);
// Output the file for download
header('Content-disposition: attachment; filename="' . $zip_filename . '"');
header('Content-Disposition: attachment; filename="' . $zip_filename . '"');
header("Content-Type: application/zip");
$success = readfile($zip_filepath);
} elseif ($action === 'cloud') { // Only zipfile or cloud should be possible values for $action here

View file

@ -295,7 +295,7 @@ class File extends DAV\Node implements DAV\IFile {
$unsafe_types = array('text/html', 'text/css', 'application/javascript');
if (in_array($r[0]['filetype'], $unsafe_types) && (! channel_codeallowed($this->data['uid']))) {
header('Content-disposition: attachment; filename="' . $r[0]['filename'] . '"');
header('Content-Disposition: attachment; filename="' . $r[0]['filename'] . '"');
header('Content-type: text/plain');
}