mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +00:00
Revert "add test to prove requesthandler works correct with Angular wonky accept headers"
This reverts commit 8507ef83f1
.
Incorrect header was used for this test, Cake cannot safely determine correct header.
To get CakePHP to respond with json, you can modify the angular common headers.
This commit is contained in:
parent
e2177361b5
commit
fcffe3961f
1 changed files with 0 additions and 14 deletions
|
@ -197,20 +197,6 @@ class RequestHandlerComponentTest extends CakeTestCase {
|
||||||
$this->assertEquals('json', $this->RequestHandler->ext);
|
$this->assertEquals('json', $this->RequestHandler->ext);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Test that RequestHandler sets $this->ext when Angular sends its wonky-ish headers.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function testInitializeContentTypeWithAngularAccept() {
|
|
||||||
$_SERVER['HTTP_ACCEPT'] = 'application/json, text/plain, * / *';
|
|
||||||
$this->assertNull($this->RequestHandler->ext);
|
|
||||||
Router::parseExtensions('json');
|
|
||||||
|
|
||||||
$this->RequestHandler->initialize($this->Controller);
|
|
||||||
$this->assertEquals('json', $this->RequestHandler->ext);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test that RequestHandler sets $this->ext when jQuery sends its wonky-ish headers
|
* Test that RequestHandler sets $this->ext when jQuery sends its wonky-ish headers
|
||||||
* and the application is configured to handle multiple extensions
|
* and the application is configured to handle multiple extensions
|
||||||
|
|
Loading…
Add table
Reference in a new issue