Skip to content

Commit

Permalink
fix: Parse headers in reverse order to ensure match on latest Content…
Browse files Browse the repository at this point in the history
…-Type header
  • Loading branch information
DannyvdSluijs committed May 21, 2024
1 parent 9e0134d commit 15d89ea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/JsonSchema/Uri/Retrievers/FileGetContents.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 15d89ea

Please sign in to comment.