Capture all runtime substitution variables in template

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Capture all runtime substitution variables in template

Peter Schmitt

The documentation on templates says that my template can access variables like "[post or get variable name], [post or get variable name_esc]".

So if my layer is defined with a runtime substitution variable image_id as follows:

                NAME layer_1
                DATA "/vsis3/bucket/%image_id%.tif"
                        'image_id' "^[0-9A-F]{16}$"
                        'default_image_id' "not-available"
                TYPE RASTER

then my template can output [image_id].  This is very handy.  Is there a template variable to capture all variables?  That is, if I make a request:

I'd like a template variable something like [variables] to return all variables not understood by WMS/WFS, so [variables] = "image_id=D0A001D2734FAE00&auth_id=foobarbaz"?

I do realize that my template could have both [image_id] and [auth_id], but I'm considering an application that may have many different types of variables passed in where I don't know in advance every possible custom variable when I write my template. Perhaps some of the querystring arguments (for example: auth_id) are parsed upstream by a proxy for authentication prior to being handled by Mapserver.


mapserver-users mailing list
[hidden email]