nodeSolidServer / nodeSolidServer/node-solid-server
Requesting binaries with invalid Accept headers should 406, not 500
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1.8k
- Forks
- 308
- PR merge metrics
- No merged PRs in 30d
Description
Reported by @timbl:
If you request a non-rdf resource (say a PDF file) with an accept header like Accept:image/*;q=0.9, application/rdf+xml, application/xhtml+xml, text/xml;q=0.2, application/xml;q=0.2, text/html;q=0.3, text/plain;q=0.1, text/n3;q=1.0, application/x-turtle;q=1, text/turtle;q=1, the server will try to convert it from PDF to RDF, and fail with a 500 error.
Should instead return a 406 Unacceptable.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the request against a non-RDF binary such as a PDF using the Accept header shown in the issue, then trace the server's content-negotiation and conversion path. Done means an unsupported conversion returns HTTP 406 Not Acceptable instead of HTTP 500.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100