Skip to content

Commit 2aa9efd

Browse files
author
deiu
committed
Fixed mime type for JSON-LD
1 parent ac58046 commit 2aa9efd

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎lib/handlers/post.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ function handler(req, res) {
3434
if (contentType != 'text/turtle' &&
3535
contentType != 'text/n3' &&
3636
contentType != 'application/rdf+xml' &&
37-
contentType != 'application/json+ld' &&
37+
contentType != 'application/ld+json' &&
3838
contentType != 'application/nquads' &&
3939
contentType != 'application/n-quads') {
4040
debug("POST -- Invalid Content Type: " + contentType);

‎lib/parse.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ function parseHandler(req, res, next) {
1919

2020
function convertToTurtle(rawDocument, req,
2121
convertCallback) {
22-
if (req.is('application/json+ld') ||
22+
if (req.is('application/ld+json') ||
2323
req.is('application/nquads') || req.is('application/n-quads')) {
2424
var contentType = req.get('content-type').split(';')[0].trim();
2525
parse(rawDocument, contentType, convertCallback);
@@ -34,7 +34,7 @@ function parse(rawDocument, contentType, convertCallback) {
3434
var triples = [];
3535
var prefixes = {};
3636

37-
if (contentType === 'application/json+ld') {
37+
if (contentType === 'application/ld+json') {
3838
var jsonDocument;
3939
try {
4040
jsonDocument = JSON.parse(rawDocument);

0 commit comments

Comments
 (0)