Opened 21 years ago
Last modified 21 years ago
#435 new enhancement
dynamic updates of MS_MAXIMGSIZE
Reported by: | warmerdam | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | MapServer C Library | Version: | unspecified |
Severity: | minor | Keywords: | |
Cc: | jdoyon@… |
Description
Currently MS_MAXIMGSIZE is hardcoded in map.h, and limits the maximum size of the images that can be returned by mapserver. This limitation is provided to ensure folks can't unduely abuse a server by requesting huge images. I propose the following changes: o MS_MAXIMGSIZE *not* be applied to the image size in the .map file. If the application developer has explicitly provided a size, they likely mean it. o The value should be overridable via a .map file directive so people don't have to rebuild mapserver to support larger images. Daniel writes: I agree this would be a welcome change. BTW, if you create a new MAXIMGSIZE directive then don't forget that the test on MAXIMGSIZE should be applied to the WMS as well (mapwms.c). Also it should not be possible to change those maxsize values via the CGI interface. Perhaps a bug should be created for this to track everything including required updates to the docs, etc. Daniel
Change History (10)
comment:1 by , 21 years ago
Owner: | changed from | to
---|
comment:3 by , 21 years ago
Cc: | added |
---|
Might as well add Steve to the CC too in case he didn't see the list message.
comment:4 by , 21 years ago
Easy enough for CGI, we can use it for tests of CGI input either via the size parameter or the map_size parameter and remove any tests in the mapfile reader. (This may be problematic IF we take blocks of mapfiles, that is strings, as input, but I can deal with that later). Would the same limit apply to WMS? Does the specification mandate a max size?
comment:5 by , 21 years ago
The WMS spec itself doesn't recommend or impose any value for maximum image size. However other implementations do have configurable image limits as well, either in raw size or in total number of pixels. So my answer would be yes, the MAXIMGSIZE parameter should apply to WMS as well. Actually the WMS already does cehck the MS_MAXIMGSIZE value, so it's just a matter of changing the code to check against the map->maximgsize value, or whatever variable name you pick.
comment:6 by , 21 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
I just committed the fix for this. There is a new parameter called MAXSIZE at the MAP level. I went with MAXSIZE since it already exists as a keyword and we've got enough of them already. It defaults to 2048 as before. It cannot be changed via map_maxsize syntax, but can be changed via the mapfile or mapscript. I updated: map.h mapcopy.c mapfile.c mapserv.c mapserv_fcgi.c mapwms.c If someone could confirm that it works... Steve
comment:7 by , 21 years ago
Keywords: | VERIFIED added |
---|
I verified that it works for the WMS interface. I also added the maxsize member variable to the mapObj in the PHP MapScript wrappers. That leaves the mapfile reference to update. Should we create a separate bug for that JF?
comment:8 by , 21 years ago
Keywords: | VERIFIED removed |
---|---|
Resolution: | fixed |
Status: | closed → reopened |
Nope, I'm just going to re-assign it to me so I remember to do it ... So the usage is MAXSIZE x y with 2048 as default for both, correct ?
comment:9 by , 21 years ago
Owner: | changed from | to
---|---|
Status: | reopened → new |
comment:10 by , 21 years ago
Usage is just MAXSIZE 2048. I don't see much benefit in allowing different values for x and y...
Note:
See TracTickets
for help on using tickets.