nodeSolidServer / nodeSolidServer/node-solid-server

Content Negotiator misinterprets Accept Header

Open
#1,434 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
1.8k
Forks
308
PR merge metrics
No merged PRs in 30d

Description

If the folder contains an index.html, the Accept Header is not interpreted consistently.

Accept: application/n-quads,application/trig;q=0.95,application/ld+json;q=0.9,application/n-triples;q=0.8,text/turtle;q=0.5,*/*;q=0.1
Will return the index.html. Even though text/html is 0.1.

Accept: */*;q=0.1,application/n-quads,application/trig;q=0.95,application/ld+json;q=0.9,application/n-triples;q=0.8,text/turtle;q=0.5
If the wildcard */*;q=0.1 is moved to the front, the server responds with a LD Resource which describes the container.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing both Accept header examples against a folder containing index.html, then compare the returned representation with the advertised quality values. Done means content negotiation handles the wildcard position consistently and selects the response indicated by the header rather than returning index.html unexpectedly.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.