Skip to content

Commit 4203e73

Browse files
committed
fix #598, #592 (alternative implementation to #594 ) - set isCoalescing property to true on XMLInputFactory since in a certain environment the underlying stax implementation was breaking up one XML text node into multiple because the HTTP stream was chunked, and this was breaking parsing of the JSON in that text node
(cherry picked from commit 1bfe12a)
1 parent 5947fd2 commit 4203e73

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/main/java/com/marklogic/client/io/SearchHandle.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ protected void receiveContent(InputStream content) {
151151
XMLInputFactory factory = XMLInputFactory.newFactory();
152152
factory.setProperty("javax.xml.stream.isNamespaceAware", true);
153153
factory.setProperty("javax.xml.stream.isValidating", false);
154+
factory.setProperty("javax.xml.stream.isCoalescing", true);
154155

155156
XMLEventReader reader = factory.createXMLEventReader(content, "UTF-8");
156157
SearchResponseImpl response = new SearchResponseImpl();

0 commit comments

Comments
 (0)