Nuno, standards conformance is a good thing. There are three issues that we need to discuss:
(1) This is a backwards-incompatible change for clients that rely on receiving a response with a "text/xml" MIME type. As this behaviour does not comply with the WFS 2.0 standard, clients have no basis to expect it, but it is nonetheless a change that may have some impact. (2) GML 3.1 output will still use "text/xml". This is inconsistent with GML 3.2 output, but then the WFS 1.1 and 2.0 standards are inconsistent. Do we prefer standards conformance or consistency? (3) Web browsers (certainly Firefox and Chrome) commonly display "text/xml" inline but offer to download "application/gml+xml". Try the layer previews and demo requests with your change applied and see the difference between GML 3.2 and GML 3.1. I can read XML (it is a Markup Language after all) and I like "text/xml" which indicates something a human can read. I think "application/gml+xml" is a horrible monstrosity. However, my preference is inconsistent with the WFS 2.0 standard. Kind regards, Ben. On 13/05/17 06:46, Nuno Oliveira wrote: > Hi, > > GeoServer WFS 2.0 responses encoded in GML 3.2 use " text/xml; > subtype=gml/3.2" as mime-type b default. > This is an invalid mime-type: > http://jersey.576304.n2.nabble.com/Media-type-parse-error-td6445421.html > > The mime-type recommended by OGC WFS 2.0 specification is > "application/gml+xml; version=3.2", although some examples in the > specification are using " text/xml; subtype=gml/3.2" (maybe not updated > examples). > > GeoServer seems to be aware of the two mime-types (but always use the > wrong one): > https://github.com/geoserver/geoserver/blob/master/src/wfs/src/main/java/org/geoserver/wfs/xml/GML32OutputFormat.java#L42-L44 > > I'm about to make a pull request that will make GeoServer use the > correct mime type by default. > > Any objection ? > > Regards, > > Nuno Oliveira > -- Ben Caradoc-Davies <b...@transient.nz> Director Transient Software Limited <http://transient.nz/> New Zealand ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Geoserver-devel mailing list Geoserver-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geoserver-devel