qlever
qlever copied to clipboard
Ignore HTTP Query parameters for POST Requests
The calls to UrlParser::parseGetRequestTarget
should strip the HTTP Query Parameters before appending the Query/Update.
This can cause problems with queries like:
- an URL-encoded
POST
to/?
- a direct POST with additional query parameters, for example,
/?default-graph-uri=...
Both lead to the query or update not being processed and an incorrect error message.
We'd get the target /??update=...
or /?default-graphi-uri=...?query=...
both of which are invalid and not handled correctly.
This PR fixes that by ignoring these query parameters. AFAIK these have also been ignored quietly before.
Further information on the cases:
- can occur with some libraries (namely rdflib) which send direct POSTs for updates to
/?
. I haven't observed this for queries. - These are syntactically valid but unsupported queries.