Opened 20 years ago

Last modified 20 years ago

#637 assigned defect

variable substitution and order in cgi parameters

Reported by: bugzilla@… Owned by: sdlime
Priority: high Milestone:
Component: MapServer CGI Version: 4.0
Severity: minor Keywords:
Cc:

Description

Order in cgi parameters does matter. 
 
Bad: 
/cgi-bin/mapserv?map=/gis/mymap.map&mode=map&user=USER&map_mylayer_data=%25user%25%2Fmylayer.png 
 
Good: 
/cgi-bin/mapserv?map=/gis/mymap.map&mode=map&map_mylayer_data=%25user%25%2Fmylayer.png&user=USER 
 
The first URL fails because it can't find the data image. It is neede to pass 
"user=USER" as the last argument.

Change History (2)

comment:1 by sdlime, 20 years ago

Severity: normalminor
Status: newassigned
Hmmm... I've never tried anything like that. It's still a bug, but I have to ask
why rely on substitution at all when you've got both pieces of information (the
layer name and the user name) in the same place? Subsitution was intended to
solve the problem when you had one piece in the browser and the other in the
mapfile.

   

comment:2 by bugzilla@…, 20 years ago

I know the example is a bit complicated but it is a simplification of my case. 
 
The "mylayer.png" raster image name is dinamic and i needed to pass it as a 
parameter. I am using now a second variable "%rasterimg%" and the url is: 
 
/cgi-bin/mapserv?map=/gis/mymap.map&mode=map&user=USER&rasterimg=mylayer.png 
 
By the way, it is possible to use %layer%, or any other reserved word as a substitution 
variable. It is not a bug, but it could be confusing. 
 
 
Note: See TracTickets for help on using tickets.