[MapProxy] content-type bug?

deduikertjes deduikertjes at xs4all.nl
Fri Dec 14 04:54:33 PST 2012


Yesterday I ran into problems with the xsl transformation of getfeatureinfo
requests on a wms service.

Mapproxy fails to do an xsl transformation and an error shows up in the logs:
line 31, in as_etree
     raise NotImplementedError()

I tracked the problem down to the following:
The wms service responds to WMS-requests containing
info_format=application/vnd.ogc.gml with a http response header which


If I change a line in featureinfo.py to:
def create_featureinfo_doc(content, info_format):
     if info_format in ('text/xml',
         return XMLFeatureInfoDoc(content)
     if info_format == 'text/html':
         return HTMLFeatureInfoDoc(content)

(added the
'application/vnd.ogc.gml;charset=UTF-8','text/xml;charset=UTF-8' stuff)
then everything works fine.

Is this a small bug in mapproxy or does the server send wrong headers?

I'm not a standards expert by any means, but from
http://www.htmlhelp.com/tools/validator/charset.html.en  I get the
impression that sending a charset like the server at hand does is not
wrong or at least not uncommon.

thanx, MArco

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapproxy/attachments/20121214/e3b920f1/attachment.html>

More information about the MapProxy mailing list