[mapserver-users] ScaleHint

Daniel Morissette morissette at dmsolutions.ca
Wed Jul 18 14:36:50 EDT 2001


"Doyon, Jean-Francois" wrote:
> 
> > > PS - Doesn't requiring the 'map' parameter violate the WMS spec? (I
> > > recognize the difficulty, however -- what is a service description
> > > absent a map file? Perhaps a simple wrapper example could be bundled.)
> >
> Indeed, although vendor specific parameters are allowed, they must NOT be
> required.
> 

I do not want to promote its use with WMS servers in any way, but I
would like to clarify that the map parameter if included as part of the
online resource URL is not a vendor-specific parameter and is fully
legal... the online resource URL is an opaque string that ends with "?"
or "&" so clients shouldn't have any problem with the presence or not of
the map parmeter... the WMS 1.1.0 spec says:

  6.2.1 HTTP GET
  An Online Resource URL intended for HTTP GET requests is in fact 
  only a URL prefix to which additional parameters must be appended
  in order to construct a valid Operation request. A URL prefix is
  defined as an opaque string including the protocol, hostname, 
  optional port number, path, a question mark '?', and, optionally,
  one or more server-specific parameters ending in an ampersand '&'.
  The prefix uniquely identifies the particular service instance. A
  client appends the necessary request parameters as name/value pairs
  in the form "name=value&". The resulting URL must be valid according
  to the HTTP Common Gateway Interface (CGI) standard[16], which 
  mandates the presence of '?' before the sequence of query parameters
  and the '&' between each parameter. As with all CGI applications, 
  the query URL is encoded[12] to protect special characters.
  The URL prefix must end in either a '?' (in the absence of additional
  server-specific parameters) or a '&'. In practice, however, Clients
  should be prepared to add a necessary trailing '?' or '&' before
  appending the Operation parameters defined in this specification 
  in order to construct a valid request URL.

Note that for servers that want to support the POST method, using
"?map=...&" as part of the online resource URL is not legal... it is OK
only with the GET method.


> I got around this by using the "setenvif" feature of apache ... I use
> symbolic links that all point to a same mapserv binary ... For each symbolic
> link, I test the url, and set the MAP environment variable accordinginly ...
> Works great for me !
> 
> Did that make sense ?

I like this little trick as it resolves the issue of being unable to
create a wrapper shell script on Windows... thanks a lot!!!!  We'll try
to have something about this included in the WMS howto.

-- 
------------------------------------------------------------
 Daniel Morissette               morissette at dmsolutions.ca
 DM Solutions Group              http://www.dmsolutions.ca/
------------------------------------------------------------
  Don't put for tomorrow what you can do today, because if 
      you enjoy it today you can do it again tomorrow.




More information about the mapserver-users mailing list