Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We have some users with a legacy client that does not use the "version" parameter in the GetCapabilities request. However they cannot handle WMS 1.3.0 (and the CRS parameter) yet, which our installation defaults to. Hence, in a transition phase I would like to default to WMS 1.1.1 - if possible for a single map service, otherwise for the whole installation.

Is there a setting in the mapfile or mapserver configuration to achieve this?

share|improve this question
up vote 2 down vote accepted

I don't think you can force Mapserver to default to a lower WMS version if not VERSION parameter is provided, but maybe somebody in the mailing lists can confirm it. The WMS standard is pretty clear on these situations:

6.1.4 Version Number Negotiation


If no version number is specified in the request, the server shall respond with the highest version it understands and label the response accordingly.

One possible solution is to use a rewrite engine, like mod_rewrite on Apache to attach the version you like if the VERSION parameter is missing.

share|improve this answer
Yes, I have considered mod_rewrite if there is no other option. – relet Aug 18 '10 at 9:33
I am pretty sure that there isn't a mapfile configuration that accomplishes this. I think that the best way to do this would be to either write a wrapper script that intercepts the requests and adjusts the args or use mod_rewrite. – DavidF Aug 18 '10 at 13:36

Your only other option is to encourage your users to find a client that respects the specification. Try explaining that their current client is not a WMS client. Naming and shaming the client might also work. If the developers are made aware of the problem it is a pretty easy fix for the client.

share|improve this answer
That's been done already. ;) I just prefer us to be a nice service provider and allow them a grace period to fix their side of the business. – relet Aug 18 '10 at 17:41
but by providing the fix at the server end you give them no incentive to fix their client and conform to the standard. – iant Aug 18 '10 at 18:37
Not if the length of the grace period is well-defined. – relet Aug 19 '10 at 7:19

You can force MapServer to default to a particular WMS version.

In the MAP > WEB > METADATA block you use the wms_getcapabilities_version instruction:

Default version to use for GetCapabilities requests that do not have a version parameter. If not set, the latest supported version will be returned.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.