Skip to content

Commit

Permalink
Merge pull request #63 from fcastilloes/master
Browse files Browse the repository at this point in the history
Fix response headers format
  • Loading branch information
fcastilloes committed Sep 4, 2017
2 parents fc42556 + 2710122 commit 9e6c31b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Api/Mapper/CompactPayloadMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ public function writeHttpResponse(HttpResponse $response, array $output)
];

if ($response->getHeaders()) {
$output['cr']['r']['R']['h'] = $response->getHeaders();
$output['cr']['r']['R']['h'] = $response->getHeadersArray();
}

return $output;
Expand Down
2 changes: 1 addition & 1 deletion src/Api/Mapper/ExtendedPayloadMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ public function writeHttpResponse(HttpResponse $response, array $output)
];

if ($response->getHeaders()) {
$output['command_reply']['response']['response']['headers'] = $response->getHeaders();
$output['command_reply']['response']['response']['headers'] = $response->getHeadersArray();
}

return $output;
Expand Down
1 change: 1 addition & 0 deletions src/Api/Protocol/Http/HttpResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ public function getHeadersArray(): array
public function setHeader($header, $value)
{
$this->headers[$header][] = $value;
$this->headerKeys[] = $header;

return $this;
}
Expand Down

0 comments on commit 9e6c31b

Please sign in to comment.