<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-text-plain" wrap="true" graphical-quote="true"
      style="font-family: -moz-fixed; font-size: 12px;" lang="x-western">
      <pre wrap="">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
<a class="moz-txt-link-freetext" href="http://www.htmlhelp.com/tools/validator/charset.html.en">http://www.htmlhelp.com/tools/validator/charset.html.en</a> I get the
impression that sending a charset like the server at hand does is not
wrong or at least not uncommon.

thanx, MArco




</pre>
    </div>
  </body>
</html>