Syntax error when SPARQL Insert request is too large
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
@angelo-v Could you try with https://solidweb.org I suspect a server implementation problem on solid https://solidcommunity.net
I already tried with my own NSS, so I don't think it is instance specific