You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
message to the api kit router it fails validating the schema with:
[Fatal Error] :4:13: Invalid byte 2 of 4-byte UTF-8 sequence.
because RestXmlSchemaValidator first makes a String out of the inputstream with UTF-8 encoding:
input = IOUtils.toString((InputStream) input, muleEvent.getMessage().getEncoding());
and 7 lines later parses it with
data = loadDocument(IOUtils.toInputStream((String) input));
which uses Charset.defaultCharset() = "Cp1252"
and so the xml parser fails as the "ä" is now Cp1252 encoded but xml-header tells him UTF-8'.
Before the commit
https://github.com/mulesoft/apikit/commit/956bedf243dbfd306cfefa6f4b33712953e32455
the code of RestJsonSchemaValidator.java was correct to directly let the DocumentBuilder parse the inputstream.
The text was updated successfully, but these errors were encountered:
The commit
956bedf
made correct inputstream parsing fail:
We are using mule-module-apikit 1.7.3 and a mule server 3.7.3 running with file.encoding=Cp1252.
When posting an xml
message to the api kit router it fails validating the schema with:
[Fatal Error] :4:13: Invalid byte 2 of 4-byte UTF-8 sequence.
because RestXmlSchemaValidator first makes a String out of the inputstream with UTF-8 encoding:
input = IOUtils.toString((InputStream) input, muleEvent.getMessage().getEncoding());
and 7 lines later parses it with
data = loadDocument(IOUtils.toInputStream((String) input));
which uses Charset.defaultCharset() = "Cp1252"
and so the xml parser fails as the "ä" is now Cp1252 encoded but xml-header tells him UTF-8'.
Before the commit
https://github.com/mulesoft/apikit/commit/956bedf243dbfd306cfefa6f4b33712953e32455
the code of RestJsonSchemaValidator.java was correct to directly let the DocumentBuilder parse the inputstream.
The text was updated successfully, but these errors were encountered: