mirror of
https://github.com/friendica/friendica
synced 2024-11-18 22:23:42 +00:00
Revert "Use last entry for Content-Type
This commit is contained in:
parent
50e2478189
commit
756f57f198
1 changed files with 7 additions and 1 deletions
|
@ -88,7 +88,13 @@ class GuzzleResponse extends Response implements IHTTPResult, ResponseInterface
|
||||||
/** {@inheritDoc} */
|
/** {@inheritDoc} */
|
||||||
public function getContentType()
|
public function getContentType()
|
||||||
{
|
{
|
||||||
return implode($this->getHeader('Content-Type'));
|
$contentTypes = $this->getHeader('Content-Type') ?? [];
|
||||||
|
$countTypes = count($contentTypes);
|
||||||
|
if ($countTypes > 0) {
|
||||||
|
return $contentTypes[$countTypes - 1];
|
||||||
|
} else {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** {@inheritDoc} */
|
/** {@inheritDoc} */
|
||||||
|
|
Loading…
Reference in a new issue