nodeSolidServer / nodeSolidServer/node-solid-server
Syntax error when SPARQL Insert request is too large
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- JavaScript
- Sterne
- 1.8k
- Forks
- 308
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
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
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne damit, NSSs PATCH-Verarbeitung für application/sparql-update-Anfragen und den Pfad für Request-Größenfehler nachzuverfolgen, und reproduziere anschließend das bereitgestellte große INSERT-Beispiel. Als abgeschlossen gilt dies, wenn die Anfrage bei unterstützter Verarbeitung verarbeitet wird oder statt eines irreführenden Syntaxfehlers HTTP 413 Request Entity Too Large zurückgibt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- javascript, nodejs
- Bereich
- api, backend
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 45/100