[MapProxy] content-type bug?

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


Hi,

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:
  File
"/usr/local/lib/python2.6/dist-packages/MapProxy-1.2.1-py2.6.egg/mapproxy/featureinfo.py",
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
contains:

Content-Type:application/vnd.ogc.gml;charset=UTF-8

If I change a line in featureinfo.py to:
def create_featureinfo_doc(content, info_format):
     if info_format in ('text/xml',
'application/vnd.ogc.gml','application/vnd.ogc.gml;charset=UTF-8','text/xml;charset=UTF-8'):
         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