Skip to content

Commit

Permalink
Consolidate more code and update docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Dec 29, 2012
1 parent 6f33811 commit 2833caa
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
9 changes: 9 additions & 0 deletions lib/Cake/Network/Http/Message.php
Expand Up @@ -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
*
Expand Down
9 changes: 0 additions & 9 deletions lib/Cake/Network/Http/Request.php
Expand Up @@ -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.
*
Expand Down
5 changes: 5 additions & 0 deletions lib/Cake/Test/TestCase/Network/Http/ResponseTest.php
Expand Up @@ -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',
Expand Down

0 comments on commit 2833caa

Please sign in to comment.