Opened 17 years ago

Closed 17 years ago

#1996 closed defect (fixed)

Error parsing VERSION parameter in WMS CONNECTION if LAYER name contains '.'

Reported by: dmorissette Owned by: dmorissette
Priority: high Milestone:
Component: WMS Client Version: unspecified
Severity: normal Keywords:
Cc: havard.tveite@…, mapserver@…

Description

MapServer throws the following error when we use a WMS CONNECTION string that
contains a layer name with a "." in it:

msBuildWMSLayerURL(): WMS connection error. MapServer supports only WMS 1.0.0 to
1.1.1 (please verify the VERSION parameter in the connection string).
msOWSParseVersionString(): WMS server error. Invalid version
(1.1.1&SERVICE=WMS&REQUEST=GetMap&LAYERS=popp.lace&STYLES=&FORMAT=image/png).
OWS version must be in the format 'x.y' or 'x.y.z'

Here is a layer definition to reproduce:

LAYER
  DEBUG TRUE
  NAME popplace3
  TYPE RASTER
  STATUS ON
  CONNECTIONTYPE WMS
  CONNECTION
"http://www2.dmsolutions.ca/cgi-bin/mswms_gmap?VERSION=1.1.1&SERVICE=WMS&REQUEST=GetMap&LAYERS=popp.lace&STYLES=&FORMAT=image/png"
  METADATA
    "wms_srs"               "EPSG:42304"
  END
END # Layer

... if we remove the "." in popp.lace then and all is good. 

Notice the error message seems to be related to the VERSION keyword not being
parsed properly.

Change History (5)

comment:1 by dmorissette, 17 years ago

Cc: assefa@… added

comment:2 by dmorissette, 17 years ago

Owner: changed from mapserverbugs to dmorissette
Reassigned to myself

comment:3 by dmorissette, 17 years ago

Cc: havard.tveite@… added

comment:4 by mapserver@…, 17 years ago

Cc: mapserver@… added

comment:5 by dmorissette, 17 years ago

Resolution: fixed
Status: newclosed
There was a lazy bit of code that didn't care to look for an '&' delimiter when
extracting VERSION from the CONNECTION strings. That worked fine as long as
there was not any "." in the rest of the URL.

Fixed in 4.99 dev (cvs trunk) and 4.10 branch (will be in 4.10.1).There was a
lazy bit of code that didn't care to look for an '&' delimiter when extracting
version from the CONNECTION strings. That worked fine as long as there was not
any "." in the rest of the URL.

Fixed in 4.99 dev (cvs trunk) and 4.10 branch (will be in 4.10.1).
Note: See TracTickets for help on using tickets.