Skip to content

Commit

Permalink
added text/html to default format mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
lsmith77 committed Apr 17, 2011
1 parent 4c3c6cd commit c2ac830
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/Symfony/Component/HttpFoundation/Request.php
Expand Up @@ -974,6 +974,7 @@ protected function preparePathInfo()
static protected function initializeFormats()
{
static::$formats = array(
'html' => array('text/html', 'application/xhtml+xml'),
'txt' => array('text/plain'),
'js' => array('application/javascript', 'application/x-javascript', 'text/javascript'),
'css' => array('text/css'),
Expand Down
Expand Up @@ -62,7 +62,7 @@ public function testFilterDoesNothingIfRequestFormatIsNotDefined()
$event = new FilterResponseEvent($this->kernel, Request::create('/'), HttpKernelInterface::MASTER_REQUEST, $response);
$this->dispatcher->dispatch(Events::onCoreResponse, $event);

$this->assertEquals('', $event->getResponse()->headers->get('content-type'));
$this->assertEquals('text/html', $event->getResponse()->headers->get('content-type'));
}

public function testFilterSetContentType()
Expand Down

0 comments on commit c2ac830

Please sign in to comment.