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

Commit 96fadae

Browse files
committed
Merge branch 'headers-getheaders' of https://github.com/Maks3w/zf2 into feature/headers-fixes

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/Cookies.php

100755100644
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ public function addCookie(Cookie $cookie, $ref_uri = null)
9393
*/
9494
public function addCookiesFromResponse(Response $response, $ref_uri)
9595
{
96-
$cookie_hdrs = $response->headers()->get('Set-Cookie');
96+
$cookie_hdrs = $response->getHeaders()->get('Set-Cookie');
9797

9898
if (is_array($cookie_hdrs)) {
9999
foreach ($cookie_hdrs as $cookie) {

src/Request.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -300,9 +300,9 @@ public function getPost()
300300
}
301301

302302
/**
303-
* Return the Cookie header, this is the same as calling $request->headers()->get('Cookie');
303+
* Return the Cookie header, this is the same as calling $request->getHeaders()->get('Cookie');
304304
*
305-
* @convenience $request->headers()->get('Cookie');
305+
* @convenience $request->getHeaders()->get('Cookie');
306306
* @return Header\Cookie
307307
*/
308308
public function getCookie()
@@ -394,7 +394,7 @@ public function getEnv()
394394

395395
/**
396396
* Provide an alternate Parameter Container implementation for headers in this object, (this is NOT the
397-
* primary API for value setting, for that see headers())
397+
* primary API for value setting, for that see getHeaders())
398398
*
399399
* @param \Zend\Http\Headers $headers
400400
* @return \Zend\Http\Request

test/Client/CommonHttpTests.php

100755100644
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -957,7 +957,7 @@ public function testZF9404DoubleContentLengthHeader()
957957
throw new AdapterException\RuntimeException("Error requesting test URL");
958958
}
959959

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

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

992992
/**

0 commit comments

Comments
 (0)