Skip to content

Java 17 Text Blocks - CONSTRUCT query - Invalid characters (CR/LF) in header query #3653

Answered by abrokenjester
naturzukunft asked this question in Q&A
Discussion options

You must be logged in to vote

The query itself is never sent via a header attribute. It's either sent as a url parameter (when using a GET request), or as part of the payload body (when using POST). And as you correctly remark, the choice depends on the total length of the URL (including the parameters): if the client detects that that goes over a limit, it switches to POST. By default, that value is set to 4083 characters.

If your HTTP server is not accepthing URLs of that length though, you can reconfigure the max length default by setting the rdf4j.sparql.url.maxlength environment variable to some lower value. You can even set it to 0, in which case it will use POST for every query. See also https://rdf4j.org/javad…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@naturzukunft
Comment options

Answer selected by hmottestad
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants