Skip to content

Commit

Permalink
Make LOC HTTP prefLabel header parsing case-insensitive
Browse files Browse the repository at this point in the history
(cherry picked from commit f48c14a)
  • Loading branch information
osma committed Apr 16, 2024
1 parent 7a53972 commit 4a1d46c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion model/resolver/LOCResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public function resolve(int $timeout) : ?EasyRdf\Resource {
$fd = fopen($this->uri, 'rb', false, $context);
$headers = stream_get_meta_data($fd)['wrapper_data'];
foreach ($headers as $header) {
if (strpos($header, 'X-PrefLabel:') === 0) {
if (strpos(strtolower($header), 'x-preflabel:') === 0) {
$elems = explode(' ', $header, 2);
$prefLabel = $elems[1];
$graph->addLiteral($this->uri, 'skos:prefLabel', $prefLabel, 'en');
Expand Down

0 comments on commit 4a1d46c

Please sign in to comment.