Skip to content

Commit

Permalink
Adding a test and fixing issues where q value had whitespace as well.
Browse files Browse the repository at this point in the history
Refs #1684
  • Loading branch information
markstory committed Aug 26, 2011
1 parent 72ef310 commit aee650d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cake/libs/controller/components/request_handler.php
Expand Up @@ -181,7 +181,7 @@ function __construct() {
foreach ($this->__acceptTypes as $i => $type) {
if (strpos($type, ';')) {
$type = explode(';', $type);
$this->__acceptTypes[$i] = $type[0];
$this->__acceptTypes[$i] = trim($type[0]);
}
}
parent::__construct();
Expand Down
Expand Up @@ -469,7 +469,7 @@ function testRequestContentTypes() {
$this->_init();
$this->assertTrue($this->RequestHandler->isWap());

$_SERVER['HTTP_ACCEPT'] = 'application/rss+xml , text/xml, application/xml,application/xhtml+xml';
$_SERVER['HTTP_ACCEPT'] = 'application/rss+xml ;q=0.9 , text/xml, application/xml,application/xhtml+xml';
$this->_init();
$this->assertFalse($this->RequestHandler->isAtom());
$this->assertTrue($this->RequestHandler->isRSS());
Expand Down

0 comments on commit aee650d

Please sign in to comment.