Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

text/javascript is not the correct mime for js

  • Loading branch information...
commit 2967a4db233594c2e47b333678e19301f636a68f 1 parent 790a53d
@AD7six AD7six authored
View
8 lib/Cake/Test/Case/Controller/Component/RequestHandlerComponentTest.php
@@ -178,7 +178,7 @@ public function testInitializeContentTypeSettingExt() {
* @return void
*/
public function testInitializeContentTypeWithjQueryAccept() {
- $_SERVER['HTTP_ACCEPT'] = 'application/json, text/javascript, */*; q=0.01';
+ $_SERVER['HTTP_ACCEPT'] = 'application/json, application/javascript, */*; q=0.01';
$this->assertNull($this->RequestHandler->ext);
Router::parseExtensions('json');
@@ -193,7 +193,7 @@ public function testInitializeContentTypeWithjQueryAccept() {
* @return void
*/
public function testInitializeContentTypeWithjQueryAcceptAndMultiplesExtensions() {
- $_SERVER['HTTP_ACCEPT'] = 'application/json, text/javascript, */*; q=0.01';
+ $_SERVER['HTTP_ACCEPT'] = 'application/json, application/javascript, */*; q=0.01';
$this->assertNull($this->RequestHandler->ext);
Router::parseExtensions('rss', 'json');
@@ -221,7 +221,7 @@ public function testInitializeNoContentTypeWithSingleAccept() {
* @return void
*/
public function testInitializeNoContentTypeWithMultipleAcceptedTypes() {
- $_SERVER['HTTP_ACCEPT'] = 'application/json, text/javascript, application/xml, */*; q=0.01';
+ $_SERVER['HTTP_ACCEPT'] = 'application/json, application/javascript, application/xml, */*; q=0.01';
$this->assertNull($this->RequestHandler->ext);
Router::parseExtensions('xml', 'json');
@@ -630,7 +630,7 @@ public function testMapAlias() {
$this->assertEquals('text/vnd.wap.wml', $result);
$result = $this->RequestHandler->mapAlias(array('xml', 'js', 'json'));
- $expected = array('application/xml', 'text/javascript', 'application/json');
+ $expected = array('application/xml', 'application/javascript', 'application/json');
$this->assertEquals($expected, $result);
}
Please sign in to comment.
Something went wrong with that request. Please try again.