nodeSolidServer / nodeSolidServer/node-solid-server

Incorrect HTTP method in response message and duplicate Link header when creating a container

Open
#1,381 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

curl -iX POST -H'Link: <http://www.w3.org/ns/ldp#BasicContainer>; rel="type"' https://example.org/

HTTP/2 415
link: <.acl>; rel="acl", <.meta>; rel="describedBy", <http://www.w3.org/ns/ldp#Container>; rel="type", <http://www.w3.org/ns/ldp#BasicContainer>; rel="type"

PUT request require a valid content type via the Content-Type header

Note POST request but PUT in response message.

curl -iX POST -H'Content-Type: text/turtle' -H'Link: <http://www.w3.org/ns/ldp#BasicContainer>; rel="type"' https://example.org/

HTTP/2 201
location: /c4db39a0-2bc3-11ea-b34b-d1f743b7eb53/
link: <.acl>; rel="acl", <.meta>; rel="describedBy", <http://www.w3.org/ns/ldp#Container>; rel="type", <http://www.w3.org/ns/ldp#BasicContainer>; rel="type", <http://www.w3.org/ns/ldp#BasicContainer>; rel="type"

Created

Note duplicate LDP-BC rel=type. Same as https://github.com/solid/node-solid-server/issues/426

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 POST requests from the issue and trace the container-creation HTTP handling in the NodeJS server. Confirm that the error message names POST rather than PUT, and that the response emits the LDP BasicContainer type only once in the Link header.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.