1
1
Fork 0

Revert "Use last entry for Content-Type"

This reverts commit e17befb7
This commit is contained in:
Philipp Holzer 2020-10-11 23:25:14 +02:00
parent ef06fab744
commit 16f5965fd4
No known key found for this signature in database
GPG key ID: 9A28B7D4FF5667BD

View file

@ -88,13 +88,7 @@ class GuzzleResponse extends Response implements IHTTPResult, ResponseInterface
/** {@inheritDoc} */
public function getContentType()
{
$contentTypes = $this->getHeader('Content-Type') ?? [];
$countTypes = count($contentTypes);
if ($countTypes > 0) {
return $contentTypes[$countTypes - 1];
} else {
return '';
}
return implode($this->getHeader('Content-Type'));
}
/** {@inheritDoc} */