New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
aperi2007 opened this Issue Oct 24, 2012 · 4 comments

Comments

Projects
None yet
2 participants
@aperi2007

aperi2007 commented Oct 24, 2012

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

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

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

GetFeatureInfo .... &I=10&J=20
or
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.

@aperi2007

This comment has been minimized.

Show comment
Hide comment
@aperi2007

aperi2007 Oct 24, 2012

Following the hint from Steve Lime,
http://lists.osgeo.org/pipermail/mapserver-users/2012-October/073545.html

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 */

'

aperi2007 commented Oct 24, 2012

Following the hint from Steve Lime,
http://lists.osgeo.org/pipermail/mapserver-users/2012-October/073545.html

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 */

'

@aperi2007

This comment has been minimized.

Show comment
Hide comment
@aperi2007

aperi2007 Oct 31, 2012

I tested this change.
It work well.

aperi2007 commented Oct 31, 2012

I tested this change.
It work well.

@sdlime

This comment has been minimized.

Show comment
Hide comment
@sdlime

sdlime Nov 1, 2012

Member

@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

Member

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

This comment has been minimized.

Show comment
Hide comment
@sdlime

sdlime Nov 4, 2012

Member

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

Member

sdlime commented Nov 4, 2012

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment