diff --git a/src/JsonSchema/Uri/Retrievers/FileGetContents.php b/src/JsonSchema/Uri/Retrievers/FileGetContents.php index 6987e76f..27f8350b 100644 --- a/src/JsonSchema/Uri/Retrievers/FileGetContents.php +++ b/src/JsonSchema/Uri/Retrievers/FileGetContents.php @@ -51,7 +51,7 @@ public function retrieve($uri) $this->messageBody = $response; $headers = strpos($uri, 'http') === 0 ? get_headers($uri) : array(); if (!empty($headers)) { - $this->fetchContentType($headers); + $this->fetchContentType(array_reverse($headers)); } else { // Could be a "file://" url or something else - fake up the response $this->contentType = null;