Syntax error when SPARQL Insert request is too large
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- javascript, nodejs
Research direction
Start by tracing NSS's PATCH handling for application/sparql-update requests and the request-size error path, then reproduce the supplied large INSERT example. Done means the request is processed when supported or returns HTTP 413 Request Entity Too Large instead of a misleading syntax error.
Written by the indexing model from the issue text.
Description
When sending PATCH request with a really large SPARQL Insert body, NSS responds with http code 400 and the following response body:
Patch document syntax error: Line 1 of <https://pod.example/resource>: Bad syntax:
Unknown syntax at start of statememt: '[object Object]'
at: "[object Object]"
This response is very misleading, since it asserts that I did send an invalid syntax
Expected behaviour
NSS should either process the request successfully, or respond with 413 Request Entity Too Large.
Steps to reproduce
Send something like this to NSS:
PATCH https://pod.example/resource
content-type: application/sparql-update
authorization: DPoP <token>
dpop: <dpop>
INSERT DATA {
</> <> "".
</> <> "".
</> <> "".
</> <> "".
</> <> "".
... round about 10.000 more of this ...
}
Is this really practically relevant?
Yes, see https://github.com/codecentric/web-clip/issues/7
First we had an actual syntax error. After fixing it, same response on NSS but this time just too large.
Depending on the page, WebClip might do really large insert requests. If we got a 413 we could at least handle it properly
- Dominant language
- JavaScript
- Stars
- 1.8k
- Forks
- 308
- PR merge metrics
- No merged PRs in 30d
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.
More from nodeSolidServer/node-solid-server
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
nodeSolidServer/node-solid-server#1848 · 2 comments · 1 reaction ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
nodeSolidServer/node-solid-server#1841 · 2 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
nodeSolidServer/node-solid-server#1147 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
nodeSolidServer/node-solid-server#1867 ·
-
Difficulty 5/5 Over a week Newbie friendliness 45/100
nodeSolidServer/node-solid-server#1853 ·
All issues in nodeSolidServer/node-solid-server
Similar issues
-
ai-observability bug team/ai-observability
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
AllTheMods/ATM-10-L#19 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
SignalK/n2k-signalk#345 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
JuliaPluto/PlutoPlotly.jl#72 ·