(req, res, next)
| 84 | // needed to avoid breaking access with bad acl |
| 85 | // or breaking containement triples for meta |
| 86 | function putValidRdf (req, res, next) { |
| 87 | const ldp = req.app.locals.ldp |
| 88 | const contentType = req.get('content-type') |
| 89 | const requestUri = ldp.resourceMapper.getRequestUrl(req) |
| 90 | |
| 91 | if (ldp.isValidRdf(req.body, requestUri, contentType)) { |
| 92 | const stream = stringToStream(req.body) |
| 93 | return putStream(req, res, next, stream) |
| 94 | } |
| 95 | next(new HTTPError(400, 'RDF file contains invalid syntax')) |
| 96 | } |
| 97 | |
| 98 | function isAuxiliary (req) { |
| 99 | const originalUrlParts = req.originalUrl.split('.') |
no test coverage detected