Andy Seaborne created JENA-1312:
-----------------------------------

             Summary: Bad UTF-8 string causes different behaviour between 
"fuseki -v" and "fuseki".
                 Key: JENA-1312
                 URL: https://issues.apache.org/jira/browse/JENA-1312
             Project: Apache Jena
          Issue Type: Bug
            Reporter: Andy Seaborne


{noformat}
#!/bin/bash

DATA=$'PREFIX : <http://exmaple/> INSERT DATA { :s :p "abc\xFE\xFFxyz" }'

curl -XPOST \
     --header 'Content-type: application/sparql-update' \
     --data "$DATA" \
     http://localhost:3030/ds/update
{noformat}

With -v:
{noformat}
[2017-03-28 18:23:27] Fuseki     WARN  [2] Runtime IO Exception (client left?) 
RC = 500 : java.nio.charset.MalformedInputException: Input length = 1
org.apache.jena.atlas.RuntimeIOException: 
java.nio.charset.MalformedInputException: Input length = 1
        at org.apache.jena.atlas.io.IO.exception(IO.java:233)
        at 
org.apache.jena.fuseki.servlets.SPARQL_Update.executeBody(SPARQL_Update.java:183)
{noformat}
(this is in the verbose handling)

This causes a 500.

Without "-v", a 204 response is generated (javacc converts the bytes to 
charcaters, not java).



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to