Kohana v3.3.2

This commit is contained in:
Deon George
2014-09-06 23:43:07 +10:00
parent f96694b18f
commit 8888719653
236 changed files with 1685 additions and 996 deletions

View File

@@ -175,6 +175,29 @@ class Kohana_Request_ClientTest extends Unittest_TestCase
$this->assertFalse(isset($headers['x-not-in-follow']), 'X-Not-In-Follow should not be passed to next request');
}
/**
* Tests that the follow_headers are only added to a redirect request if they were present in the original
*
* @ticket 4790
*/
public function test_follow_does_not_add_extra_headers()
{
$response = Request::factory(
$this->_dummy_redirect_uri(301),
array(
'follow' => TRUE,
'follow_headers' => array('Authorization')
))
->headers(array())
->execute();
$data = json_decode($response->body(),TRUE);
$headers = $data['rq_headers'];
$this->assertArrayNotHasKey('authorization', $headers, 'Empty headers should not be added when following redirects');
}
/**
* Provider for test_follows_with_strict_method
*

View File

@@ -148,7 +148,7 @@ class Kohana_Request_Client_ExternalTest extends Unittest_TestCase {
$json,
$post,
array(
'content-type' => 'application/x-www-form-urlencoded',
'content-type' => 'application/x-www-form-urlencoded; charset='.Kohana::$charset,
'body' => http_build_query($post, NULL, '&')
)
)