head fixings
This commit is contained in:
parent
8e2cc678dc
commit
3033f79529
2 changed files with 4 additions and 2 deletions
|
@ -61,7 +61,7 @@ class ParseUrl
|
|||
*/
|
||||
public static function getContentType(string $url, string $accept = HttpClientAccept::DEFAULT)
|
||||
{
|
||||
$curlResult = DI::httpClient()->head($url);
|
||||
$curlResult = DI::httpClient()->head($url, [HttpClientOptions::ACCEPT_CONTENT => $accept]);
|
||||
|
||||
// Workaround for systems that can't handle a HEAD request
|
||||
if (!$curlResult->isSuccess() && ($curlResult->getReturnCode() == 405)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue