GetCapabilities request results in download mapserv.exe

Barend Köbben kobben at ITC.NL
Wed Apr 25 14:45:51 EDT 2007

As a follow-up to the remarks of Tom Kralidis: It is true that OGC sepcs mention "application/vnd.ogc.wms_xml" as the default MIME type to return. It has also been recognised as a mistake, and WMS 1.3 specs have (I think) returned to "text/html" or "text/xml" as teh default.  However, the WMS 1.1.1 spec also supports a URL parameter EXCEPTIONS that can be issued to ask for expceptions (=error messages) in another MIME type. We use it in our RIMapperWMS, which is a WMS specifically for SVG output, to be able to return error messages in SVG (image/svg+xml) or in straight HTML (text/html) whenever the requesting UA does not support SVG.
A useful addition for the next version Mapserver would thus be to support at least EXCEPTIONS=text/html. Is there an offical place to request features for upcoming releases?
Barend Köbben 
International Institute for Geo-information Sciences and  Earth Observation (ITC) 
PO Box 6, 7500AA Enschede (The Netherlands) 
ph: +31-(0)534874253; mobile: +31-(0)622344955


From: UMN MapServer Users List on behalf of Kralidis,Tom [Burlington]
Sent: Wed 4/25/2007 17:36
Subject: Re: [UMN_MAPSERVER-USERS] GetCapabilities request results in download mapserv.exe

> Altough this has been handled before:
> I'm experiencing the same problem.
> Yet, when I try to open the resulting mapserv.exe file it
> opens a (so it seems) perfect capabilities-document ( not an
> error-document)
> Running my app on several pc's results in not showing up the
> WMS. I don't know if the above problem is related to this.
> Anyone experiencing the same ? I try to make mapserver make a
> capabilities document which is viewable in the browser...

The OGC:WMS 1.1.0 and 1.1.1 specifications state that, for
GetCapabilities responses, the OGC:WMS server returns a specific MIME
type (i.e. application/vnd.ogc.xml (see subclause 6.5.3 of OGC:WMS 1.1.1

A MIME type is passed from the web server to the client (in your case, a
web browser), from which a client can decide how to process it.

Example 1: if using a web browser, if a web server returns an HTTP
Header of "Content-type:image/png", then the web browser will know that
this is a PNG image and display it accordingly.

Example 2: if using a web browser, if a web server returns an HTTP
Header of "Content-type:text/html", then the web browser will know that
this is an HTML page and display it accordingly (i.e. tables, divs,

Basically, what is happening is that the OGC:WMS is returning, in the
headers of the HTTP response, a MIME type which your web browser does
not understand, which usually prompts a dialog box on whether to open or
download the content (i.e. Content-type:application/vnd.ogc.wms_xml).

You could configure your web browser to handle the
application/vnd.ogc.wms_xml MIME type a certain way (i.e. open in
Notepad, etc.).
Hope this helps


P.S. I've since posted this as an FAQ at

More information about the mapserver-users mailing list