mirror of
https://github.com/friendica/friendica
synced 2024-11-19 02:23:41 +00:00
Fixing Response
This commit is contained in:
parent
7cd85873ee
commit
ae24bf8d54
1 changed files with 1 additions and 11 deletions
|
@ -100,18 +100,8 @@ class Response implements ICanCreateResponses
|
|||
*/
|
||||
public function generate(): ResponseInterface
|
||||
{
|
||||
$headers = [];
|
||||
|
||||
foreach ($this->headers as $key => $header) {
|
||||
if (empty($key)) {
|
||||
$headers[] = $header;
|
||||
} else {
|
||||
$headers[] = "$key: $header";
|
||||
}
|
||||
}
|
||||
|
||||
// Setting the response type as an X-header for direct usage
|
||||
$headers['X-RESPONSE-TYPE'] = $this->type;
|
||||
$this->headers['X-RESPONSE-TYPE'] = $this->type;
|
||||
|
||||
return new \GuzzleHttp\Psr7\Response(200, $this->headers, $this->content);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue