should Mapserver WMS client URL encode?

Ed McNierney ed at TOPOZONE.COM
Fri Mar 25 11:54:49 EST 2005


Bart -

I don't recall the previous discussion, but it would seem strange for a
WMS server to NOT handle HTTP querystrings that were URL-encoded.  The
specification doesn't QUITE come out and say that servers shall accept
all valid encoded querystrings, but it does say (Section 6.2.1, WMS
1.1.1 spec):

When the characters "?", "&", "=", "/", ":" and "," appear in one of the
roles defined in Table 1, they are to appear literally in the URL. When
such characters appear elsewhere (for example, in the value of a
parameter), they are to be encoded as defined in [IETF RFC 2396].

This section requires the client to encode at least these special
characters.  It doesn't say that the SERVER shall accept them, but I
would expect that to be the intended result <g>.  And if you're going to
accept THOSE characters in RFC-2396 encodings, then it's reasonable to
expect that ALL valid RFC-2396 encodings should be accepted.

The problem in the spec (as far as URL querystrings go) is that the
focus is on the rules clients must follow in constructing URL
querystrings, while there is nothing said about what rules servers must
follow.  I would say there's a strong implication throughout Section 6.2
that any valid URL querystring should be supported by a WMS server.

        - Ed

Ed McNierney
President and Chief Mapmaker
TopoZone.com / Maps a la carte, Inc.
73 Princeton Street, Suite 305
North Chelmsford, MA  01863
ed at topozone.com
(978) 251-4242 

-----Original Message-----
From: UMN MapServer Developers List [mailto:MAPSERVER-DEV at LISTS.UMN.EDU]
On Behalf Of Bart van den Eijnden
Sent: Friday, March 25, 2005 10:50 AM
To: MAPSERVER-DEV at LISTS.UMN.EDU
Subject: [UMN_MAPSERVER-DEV] should Mapserver WMS client URL encode?

Hi list,

I remember a discussion initiated by me about a year ago about whether
or not Mapserver CGI should react correctly to URL encoded requests. The
answer was, if I remember correctly, that it does not have to do that.

Together with Nuno, I have been looking into a problem letting Mapserver
WMS client talk with the ERMapper WMS.

ERMapper WMS does not like URL encoded parameters, but Mapserver WMS
client does encode a few, like layers and bbox.

I would assume that given the outcome of the previous discussion,
Mapserver WMS client is wrong in encoding the parameters.

Is this a right assumption?

Best regards,
Bart



More information about the mapserver-dev mailing list