[ 
https://issues.apache.org/jira/browse/JENA-1312?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15952214#comment-15952214
 ] 

ASF subversion and git services commented on JENA-1312:
-------------------------------------------------------

Commit 8d694fc4db6fe2473c5b2dcbbf5bbf3781eb6091 in jena's branch 
refs/heads/master from [~andy.seaborne]
[ https://git-wip-us.apache.org/repos/asf?p=jena.git;h=8d694fc ]

JENA-1312: Merge commit 'refs/pull/229/head' of github.com:apache/jena

This closes #229.


> 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
>
> This is the raw bytes for a BOM - i.e. no UTF-8 encoded.  This report is not 
> specific to this bad encoded data.
> {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.
> It is using a Java StreamDecoder. Decoding via, e.g, new String(bytes, UTF-8) 
> works, no error. It is a different code path in the JDK.
> Without "-v", a 204 response is generated (javacc converts the bytes to 
> characters, not java).



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

Reply via email to