89 # We take over from $wgOut, excepting its cache header info
91 $mimetype = $this->contentType( $output->getRequest() );
92 header(
"Content-type: $mimetype; charset=UTF-8" );
99 $ext = $mimeAnalyzer->getExtensionFromMimeTypeOrNull( $mimetype ) ??
'xml';
100 header(
"Content-Disposition: inline; filename=\"feed.{$ext}\"" );
103 $output->addVaryHeader(
'X-Forwarded-Proto' );
105 $output->sendCacheControl();
113 private function contentType(
$request ): string {
118 'application/rss+xml',
119 'application/atom+xml'
122 return ( in_array(
$ctype, $allowedctypes ) ?
$ctype :
'application/xml' );
132 $this->sendHttpHeaders( $output );
133 echo
'<?xml version="1.0"?>' .
"\n";
A class containing constants representing the names of configuration variables.
This is one of the Core classes and should be read at least once by any new developers.