Skip to content
This repository has been archived by the owner on Jan 30, 2020. It is now read-only.

Commit

Permalink
Merge branch 'headers-getheaders' of https://github.com/Maks3w/zf2 in…
Browse files Browse the repository at this point in the history
…to feature/headers-fixes
  • Loading branch information
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/Cookies.php
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public function addCookie(Cookie $cookie, $ref_uri = null)
*/
public function addCookiesFromResponse(Response $response, $ref_uri)
{
$cookie_hdrs = $response->headers()->get('Set-Cookie');
$cookie_hdrs = $response->getHeaders()->get('Set-Cookie');

if (is_array($cookie_hdrs)) {
foreach ($cookie_hdrs as $cookie) {
Expand Down
6 changes: 3 additions & 3 deletions src/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -300,9 +300,9 @@ public function getPost()
}

/**
* Return the Cookie header, this is the same as calling $request->headers()->get('Cookie');
* Return the Cookie header, this is the same as calling $request->getHeaders()->get('Cookie');
*
* @convenience $request->headers()->get('Cookie');
* @convenience $request->getHeaders()->get('Cookie');
* @return Header\Cookie
*/
public function getCookie()
Expand Down Expand Up @@ -394,7 +394,7 @@ public function getEnv()

/**
* Provide an alternate Parameter Container implementation for headers in this object, (this is NOT the
* primary API for value setting, for that see headers())
* primary API for value setting, for that see getHeaders())
*
* @param \Zend\Http\Headers $headers
* @return \Zend\Http\Request
Expand Down
4 changes: 2 additions & 2 deletions test/Client/CommonHttpTests.php
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -957,7 +957,7 @@ public function testZF9404DoubleContentLengthHeader()
throw new AdapterException\RuntimeException("Error requesting test URL");
}

$clen = $response->headers()->get('Content-Length');
$clen = $response->getHeaders()->get('Content-Length');

if (! (is_array($clen))) {
$this->markTestSkipped("Didn't get multiple Content-length headers");
Expand Down Expand Up @@ -986,7 +986,7 @@ public function testContentTypeAdditionlInfo($params)
$this->client->send();
$request = Request::fromString($this->client->getLastRawRequest());
$this->assertEquals($content_type,
$request->headers()->get('Content-Type')->getFieldValue());
$request->getHeaders()->get('Content-Type')->getFieldValue());
}

/**
Expand Down

0 comments on commit 96fadae

Please sign in to comment.