I want to rewrite the Content-Type header of the response for a GML format GetFeatureInfo request. I need to add "; charset=utf-8" to the default "application/vnd.ogc.gml" content-type header. As reported in Ticket #2583 (http://trac.osgeo.org/mapserver/ticket/2583), the encoding directive in the xml declaration tag is not enough to get some browsers to properly parse the xml properly when it contains non- US-ASCII characters. Since this defect is not scheduled to be fixed until 5.4, I need some other way to add to or modify the Content-Type so that it can be properly parsed by browsers. I am using the CGI version of mapserver on an apache-2.0.61 on 64bit Linux Slackware from HostGIS
Mapserver directly sets a Content-Type header which is not text/plain or any other text/* type. Therefore the default content-type, default charset, mime.type and magic do not have any effect on the Content-Type header generated by mapserver. Also since the output is from a cgi program with no extension, and mapserver produces responses with other content-types that I don't want modified, Add Type & Force don't seem to be valid options. I want to ensure that all responses with a Content-Type header of "application/vnd.ogc.gml" are modified to "application/vnd.ogc.gml; charset=utf-8" or even "text/xml; charset=utf-8". What is the best way to go about this? Do I need to write a custom ContentFilter or is there some way to set options in httpd.conf, .htaccess, or other such file that would make this content-type modification automattically? -- View this message in context: http://www.nabble.com/Change-Content-Type-header-for-GML-GetFeatureInfo-request-on-Apache-tp19337438p19337438.html Sent from the Mapserver - User mailing list archive at Nabble.com. _______________________________________________ mapserver-users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/mapserver-users
