From 2833caab3ae63e63bc429cf9be5296e701a3966a Mon Sep 17 00:00:00 2001 From: mark_story Date: Fri, 28 Dec 2012 21:49:00 -0500 Subject: [PATCH] Consolidate more code and update docs. --- lib/Cake/Network/Http/Message.php | 9 +++++++++ lib/Cake/Network/Http/Request.php | 9 --------- lib/Cake/Test/TestCase/Network/Http/ResponseTest.php | 5 +++++ 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/lib/Cake/Network/Http/Message.php b/lib/Cake/Network/Http/Message.php index f1ac8bec7d3..fa64213420c 100644 --- a/lib/Cake/Network/Http/Message.php +++ b/lib/Cake/Network/Http/Message.php @@ -65,6 +65,15 @@ protected function _normalizeHeader($name) { return implode('-', $parts); } +/** + * Get all headers + * + * @return array + */ + public function headers() { + return $this->_headers; + } + /** * Get all cookies * diff --git a/lib/Cake/Network/Http/Request.php b/lib/Cake/Network/Http/Request.php index da82b49e23b..bc8e0d28b91 100644 --- a/lib/Cake/Network/Http/Request.php +++ b/lib/Cake/Network/Http/Request.php @@ -110,15 +110,6 @@ public function header($name = null, $value = null) { return $this; } -/** - * Get all headers - * - * @return array - */ - public function headers() { - return $this->_headers; - } - /** * Get/Set cookie values. * diff --git a/lib/Cake/Test/TestCase/Network/Http/ResponseTest.php b/lib/Cake/Test/TestCase/Network/Http/ResponseTest.php index 3e89b70a37d..2f71c7b28ee 100644 --- a/lib/Cake/Test/TestCase/Network/Http/ResponseTest.php +++ b/lib/Cake/Test/TestCase/Network/Http/ResponseTest.php @@ -21,6 +21,11 @@ */ class ResponseTest extends TestCase { +/** + * Test parsing headers and capturing content + * + * @return void + */ public function testHeaderParsing() { $headers = [ 'HTTP/1.0 200 OK',