Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#32118] Content-Type header is sent twice #2086

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
[#32118] Content-Type header is sent twice
  • Loading branch information
Michael Babker committed Sep 28, 2013
commit d38eedfb24ccc0e53dfe35800a72906166cece41
7 changes: 5 additions & 2 deletions libraries/joomla/document/document.php
Original file line number Diff line number Diff line change
Expand Up @@ -951,11 +951,14 @@ public function parse($params = array())
*/
public function render($cache = false, $params = array())
{
$app = JFactory::getApplication();

if ($mdate = $this->getModifiedDate())
{
JFactory::getApplication()->setHeader('Last-Modified', $mdate /* gmdate('D, d M Y H:i:s', time() + 900) . ' GMT' */);
$app->modifiedDate = $mdate;
}

JFactory::getApplication()->setHeader('Content-Type', $this->_mime . ($this->_charset ? '; charset=' . $this->_charset : ''));
$app->mimeType = $this->_mime;
$app->charSet = $this->_charset;
}
}