nodeSolidServer / nodeSolidServer/node-solid-server
Syntax error when SPARQL Insert request is too large
Nessuno ha ancora preso questa issue.
- Lingua principale
- JavaScript
- Stelle
- 1.8k
- Fork
- 308
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
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
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia tracciando la gestione di PATCH da parte di NSS per le richieste application/sparql-update e il percorso dell’errore relativo alle dimensioni della richiesta, quindi riproduci l’esempio INSERT di grandi dimensioni fornito. Il lavoro è completato quando la richiesta viene elaborata se supportata oppure restituisce HTTP 413 Request Entity Too Large invece di un errore di sintassi fuorviante.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- javascript, nodejs
- Ambito
- api, backend
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 45/100