CGI base URL behaviour

Daniel Morissette dmorissette at DMSOLUTIONS.CA
Mon Nov 15 10:52:55 EST 2004


Kralidis,Tom [Burlington] wrote:
>
> "No query information to decode. QUERY_STRING is set, but empty."
>
> ...which we all know what this is and what it means.
>
> In an OGC scenario, I believe that an OGC Service Exception should be
> returned, as the URL above is missing keywords for a given OWS request.
> Is this anywhere in the OGC CITE assertions?
>

Returning an XML exception may be the ideal situation, but there is no
way to tell that we are in an "OGC scenario". The same mapfile/server
installation can be used for OGC and non-OGC stuff, so there is no way
to tell that we're in an OGC scenario until we detect OGC-specific
parameters in the URL. In the absence of OGC-specific parameters in the
URL then the default is to assume that this is a regular CGI call, and
the message above is returned.

However what we do isn't against the spec: I don't think this situation
is addressed at all in the spec. IIRC, the WMS spec warns client
implementers that they should be prepared to handle unexpected results
from malformed requests, such as 404 errors, Java exceptions/stack (!),
or this error from MapServer.


> In a non-OGC scenario (pure MapServer CGI), what is returned has become
> pretty defacto (though I would argue for XML-based MapServer error
> reporting, but that's another story).
>

Even if MapServer was modified to use XML-based error reporting, that
still wouldn't solve your problem since the default XML exception
produced in the situation above would not be an OGC exception. (i.e.
until we detect that this is a OWS request, the default
XML-based-exception from the traditional CGI would apply)

Daniel
--
------------------------------------------------------------
  Daniel Morissette               dmorissette at dmsolutions.ca
  DM Solutions Group              http://www.dmsolutions.ca/
------------------------------------------------------------



More information about the mapserver-dev mailing list