[mapserver-users] WMS 1.3.0 questions

Daniel Morissette dmorissette at mapgears.com
Wed Nov 10 15:47:15 EST 2010


Let me try to clarify a few things:

1- The default version that is mentioned in ticekt 3444 would be only
for GetCapabilities and would essentially be a hint for MapServer to
give preference to that version in a GetCapabilities response if no
version is specified.

2- There CANNOT be a default version applied to GetMap as this would be
contrary to the spec. (And MapServer does not apply a default version in
GetMap's case)

3- That may not be obvious, but MapServer honors the VERSION that you
set in a GetMap request... it's just that it works with ranges of
versions for each version-specific difference in the spec instead of
discrete version numbers in an attempt to be forgiving of clients that
support only intermediate versions that MapServer may not be explicitly
built for. More specifically:

(0.0.0 < VERSION < 1.0.7) is treated as 1.0.0

(1.0.7 <= VERSION < 1.1.0) is treated as 1.0.7

(1.1.0 <= VERSION < 1.1.1) is treated as 1.1.0

(1.1.1 <= VERSION < 1.3.0) is treated as 1.1.1

(VERSION >= 1.3.0) is treated as 1.3.0

Now, while double-checking this I found that the GetCapabilities code
that handles version negociation may not follow exactly this logic for
the 1.3.0 case and this will need a review and fix, but other than that,
that's how most of the logic works for the GetMap and other differences
between WMS spec versions. That also explains why 1.2222 works, your
request should have been treated as 1.1.1 according to the rules above.

4- After seeing this thread, I would tend to lean towards producing an
exception if version is not one of the explicitly supported values to
prevent any confusion (i.e. anything not in the following list would
produce an exception: 1.0.0, 1.0.6, 1.0.7, 1.1.0, 1.1.1 and 1.3.0)

Daniel


Bart van den Eijnden wrote:
> I think it is a bad idea to default to a certain version in GetMap.
> Version is a required parameter and an exception should be thrown if a
> version is not known. Also to avoid issues that Yves M has raised.
> 
> Bart
> 
> Sent from my iPhone
> 
> On Nov 10, 2010, at 4:18 PM, Yves Moisan <yves.moisan at boreal-is.com
> <mailto:yves.moisan at boreal-is.com>> wrote:
> 
>> Le 2010-11-09 21:48, Jeff McKenna a écrit :
>>> Hello Yves,
>> Hi Jeff,
>>>
>>> Some related thoughts:
>>>
>>> - related ticket for configuring default WMS version:
>>> http://trac.osgeo.org/mapserver/ticket/3444 ...please add yourself to
>>> the CC list of that ticket and join in the discussions and testing
>>> and feedback, thanks
>> I added myself in the cc list.  The description of that ticket says
>> "For example in WMS if the version parameter is not set, MapServer
>> <http://trac.osgeo.org/mapserver/wiki/MapServer> usually defaults to
>> the latest supported version (1.3.0)."  If I read this correctly, if I
>> change MapServer from 5.2.x to 5.6 and I happen to be working with
>> EPSG codes that have their axes flipped between 1.1.1 and 1.3.0, my
>> WMS requests won't work anymore IF i didn't specify a version number. 
>> Ouch. 
>>
>> Also, what happens if I specify a non existent, but valid, number like
>> 1.2222 ?  I know an image is an image as Jukka mentioned, but how do I
>> know how MapServer interpreted my faulty version number ?  Does it
>> default to the latest supported version too ?
>>
>>> - doc pointers:
>>> http://www.mapserver.org/ogc/wms_server.html#wms-1-3-0-support
>>> ...specifically see the 2 working 1.3.0 example requests there
>>
>> I've seen those.  I can see the request parameters all right, it's
>> just that I'm not sure how MapServer reacts.  I know it chokes if I
>> send VERSION=abc, but it will send me an image whatever I use for a
>> version number as long as it is of the forms x.y or x.y.z. 
>> VERSION=1234.4567.890 will work !  Because I get only an image back,
>> how do I know how MS handled the request ?  Is there a response header
>> I'm missing somewhere ?
>>
>> Thanx.
>>
>> Yves
>>
>> _______________________________________________
>> mapserver-users mailing list
>> mapserver-users at lists.osgeo.org <mailto:mapserver-users at lists.osgeo.org>
>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users


-- 
Daniel Morissette
http://www.mapgears.com/


More information about the mapserver-users mailing list