Templating- retrieve querystring parameter should be case-insensitive #4511

aperi2007 opened this Issue Oct 24, 2012 · 4 comments


None yet

2 participants


In a template, actually the retrieve of a parameter from querystring using the sintax:

[parameter-name] is case-sensitive.
[parametername] <> [ParameterName]

I know the specs say that the querystring should be case-sensitive.
But because MapServer response both

GetFeatureInfo .... &I=10&J=20
GetFeatureInfo .... &i=10&j=20

following so a case-unsensitive logic.

I guess also the
templating retrieve parameter should follow the same logic case-insensitive.


Following the hint from Steve Lime,

The patch was to change a row of code in the "maptemplate.c" around row 4010:

for(i=0; irequest->NumParams; i++) {
snprintf(substr, PROCESSLINE_BUFLEN, "[%s]", mapserv->request->ParamNames[i]);
encodedstr = msEncodeHTMLEntities(mapserv->request->ParamValues[i]);
/* outstr = msReplaceSubstring(outstr, substr, encodedstr); BEFORE /
outstr = msCaseReplaceSubstring(outstr, substr, encodedstr); /
NEW */



I tested this change.
It work well.

sdlime commented Nov 1, 2012

@tbonfort, what do you think about adding to 6.2 branch? It's a pretty benign change. I'd actually like the attribute subs to also be case insensitive, e.g. [someitem]. --Steve

sdlime commented Nov 4, 2012

Closing. Can re-open if there is a decision to back port. Will create a separate documentation ticket.

@sdlime sdlime closed this Nov 4, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment