Use last entry for Content-Type
This commit is contained in:
parent
8c7185154d
commit
e17befb7d6
|
@ -88,7 +88,13 @@ class GuzzleResponse extends Response implements IHTTPResult, ResponseInterface
|
|||
/** {@inheritDoc} */
|
||||
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} */
|
||||
|
|
|
@ -77,7 +77,7 @@ class Images
|
|||
*
|
||||
* @param string $image_data Image data
|
||||
* @param string $filename File name (for guessing the type via the extension)
|
||||
* @param string $mimeTypes possible mime type
|
||||
* @param string $mimeType possible mime type
|
||||
*
|
||||
* @return string
|
||||
* @throws \Exception
|
||||
|
|
Loading…
Reference in a new issue