Felix Schmenger ( https://osgeo-org.atlassian.net/secure/ViewProfile.jspa?accountId=5b5890203eb9962cd05291b7 ) *created* an issue
GeoServer ( https://osgeo-org.atlassian.net/browse/GEOS?atlOrigin=eyJpIjoiMzRjOGZmYWRlYjliNDlkYjgyYWU4Y2U1ZmRiMDA0YjEiLCJwIjoiaiJ9 ) / Bug ( https://osgeo-org.atlassian.net/browse/GEOS-10509?atlOrigin=eyJpIjoiMzRjOGZmYWRlYjliNDlkYjgyYWU4Y2U1ZmRiMDA0YjEiLCJwIjoiaiJ9 ) GEOS-10509 ( https://osgeo-org.atlassian.net/browse/GEOS-10509?atlOrigin=eyJpIjoiMzRjOGZmYWRlYjliNDlkYjgyYWU4Y2U1ZmRiMDA0YjEiLCJwIjoiaiJ9 ) WFS Request fails when XML POST body is larger than 8kB ( https://osgeo-org.atlassian.net/browse/GEOS-10509?atlOrigin=eyJpIjoiMzRjOGZmYWRlYjliNDlkYjgyYWU4Y2U1ZmRiMDA0YjEiLCJwIjoiaiJ9 ) Issue Type: Bug Affects Versions: 2.21.0 Assignee: Unassigned Created: 24/May/22 6:33 PM Environment: Tomcat 9.0.63 JRE 8 and JRE 11 Debian GNU/Linux 11 (bullseye) Priority: Medium Reporter: Felix Schmenger ( https://osgeo-org.atlassian.net/secure/ViewProfile.jspa?accountId=5b5890203eb9962cd05291b7 ) For my geoserver installation, WFS GetFeature requests with a XML POST body exceeding a content length of 8kB always fail with a javax.xml.stream.XMLStreamException. I realized this issue, when trying to send a larger geometry via the viewParams WFS GetFeature parameter. Here’s a sample request: POST http://localhost:58080/geoserver/damage_potential/ows <GetFeature xmlns="http://www.opengis.net/wfs" service="WFS" version="1.1.0" outputFormat="application/json" viewParams="ws:1; geom:'some long WKT exceeding 8kB .................................'" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd"> <Query typeName="p_schaden"/> </GetFeature> <?xml version="1.0" encoding="UTF-8"?> <ows:ExceptionReport xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ows="http://www.opengis.net/ows" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0.0" xsi:schemaLocation="http://www.opengis.net/ows http://localhost:58080/geoserver/schemas/ows/1.0.0/owsExceptionReport.xsd"> <ows:Exception exceptionCode="NoApplicableCode"> <ows:ExceptionText>javax.xml.stream.XMLStreamException: ParseError at [row,col]:[4,7756] Message: An invalid XML character (Unicode: 0x0) was found in the value of attribute "viewParams" and element is "GetFeature". ParseError at [row,col]:[4,7756] Message: An invalid XML character (Unicode: 0x0) was found in the value of attribute "viewParams" and element is "GetFeature".</ows:ExceptionText> </ows:Exception> </ows:ExceptionReport> Here’s the essential part of the corresponding log: 022-05-24 15:30:45,447 ERROR [geoserver.ows] - javax.xml.stream.XMLStreamException: ParseError at [row,col]:[2,7784] Message: An invalid XML character (Unicode: 0x0) was found in the value of attribute "viewParams" and element is "GetFeature". at java.xml/com.sun.org.apache.xerces.internal.impl.XMLStreamReaderImpl.next(Unknown Source) at org.geoserver.ows.Dispatcher.readOpPost(Dispatcher.java:1607) at org.geoserver.ows.Dispatcher.service(Dispatcher.java:517) at org.geoserver.ows.Dispatcher.handleRequestInternal(Dispatcher.java:248) at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:177) Trying to track it down myself, the problem happens regardless of the WFS endpoint and the actual POST content, as long as the content exceeds roughly 8kB. My guess from the response is, that the Input stream somehow gets truncated. From looking at the code in Dispatcher.java I also tried to configure the XML_LOOKAHEAD parameter, but that did not help it. When enabling Request logging with a large enough buffer, I can see the request being logged from beginning till the end, so there is no truncation on the network layer. ( https://osgeo-org.atlassian.net/browse/GEOS-10509#add-comment?atlOrigin=eyJpIjoiMzRjOGZmYWRlYjliNDlkYjgyYWU4Y2U1ZmRiMDA0YjEiLCJwIjoiaiJ9 ) Add Comment ( https://osgeo-org.atlassian.net/browse/GEOS-10509#add-comment?atlOrigin=eyJpIjoiMzRjOGZmYWRlYjliNDlkYjgyYWU4Y2U1ZmRiMDA0YjEiLCJwIjoiaiJ9 ) Get Jira notifications on your phone! Download the Jira Cloud app for Android ( https://play.google.com/store/apps/details?id=com.atlassian.android.jira.core&referrer=utm_source%3DNotificationLink%26utm_medium%3DEmail ) or iOS ( https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=EmailNotificationLink&mt=8 ) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100198- sha1:faaaa62 )
_______________________________________________ Geoserver-devel mailing list Geoserver-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geoserver-devel