Opened 19 years ago

Last modified 19 years ago

#1158 new enhancement

"wms_sld_body" "AUTO_TMPFILE" option

Reported by: bartvde@… Owned by: mapserverbugs
Priority: high Milestone: FUTURE
Component: WMS Client Version: 4.4
Severity: minor Keywords:
Cc:

Description

We are running into the situation that SLD_BODY urls for a GetMap request which
are being generated by Mapserver WMS Client are getting longer than Apache can
handle:

[Thu Jan 06 16:46:29 2005] [error] [client 127.0.0.1] request failed: URI too
long (longer than 8190)

Is there an option to save the SLD to a file on the webserver and have Mapserver
WMS client include this in the GetMap URL using &sld=http:// ?

Change History (3)

comment:1 by bartvde@…, 19 years ago

Okay, I have done a bit more analyzing and I think we can work around this by
using the following process:

1. generate CLASSes on the WMS layer like is done now
2. don't use "wms_sld_body" "AUTO"
3. use Mapscript function generateSLD to create the SLD from the classes
4. save this document on the webserver
5. set the "wms_sld_url" METADATA in the map file for the WMS layer

Apparently it is not the intention of Mapserver WMS client to automate this process?

comment:2 by dmorissette, 19 years ago

Milestone: FUTURE
Maybe a "wms_sld_body" "AUTO_TMPFILE" option could be added that would save the
SLD body to a temp file in the IMAGEPATH/IMAGEURL directory and use that as the
SLD URL in the GetMap request. 

Saving the SLD to a temporary file everytime implies that the remote server has
to download the SLD in a separate HTTP request for *every* map. OTOH if you
pregenerate it then the remote server can cache it (if it's smart enough to
cache it). It might be worth looking into not regenerating the SLD files if we
don't need to, a bit like we did for the HTML legend icons (temporary filename
based on class/layer info and timestamp of mapfile).

But I think that should be considered a future enhancement since you have found
a good workaround already.  ;)

comment:3 by bartvde@…, 19 years ago

Severity: normalenhancement
Summary: SLD_BODY urls get longer than Apache can handle"wms_sld_body" "AUTO_TMPFILE" option
Changed the summary to something more appropriate.
Note: See TracTickets for help on using tickets.