Skip to content

Commit e3358fd

Browse files
committed
Add check to mark .meta files as Turtle.
1 parent 404594b commit e3358fd

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

src/Server.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -559,10 +559,8 @@ private function handleReadRequest(Response $response, string $path, $contents,
559559
/*/ The file does exist and no link-metadata is present /*/
560560
$response = $this->addLinkRelationHeaders($response, $path, $mime);
561561

562-
if (preg_match('/.ttl$/', $path)) {
563-
$mimetype = "text/turtle"; // FIXME: teach flysystem that .ttl means text/turtle
564-
} elseif (preg_match('/.acl$/', $path)) {
565-
$mimetype = "text/turtle"; // FIXME: teach flysystem that .acl files also want text/turtle
562+
if (preg_match('/\.(acl|meta|ttl)$/', $path)) {
563+
$mimetype = "text/turtle"; // FIXME: teach flysystem that .acl/.meta/.ttl means text/turtle
566564
} else {
567565
$mimetype = $filesystem->asMime($mime)->getMimetype($path);
568566
}

0 commit comments

Comments
 (0)