Opened 14 years ago
Closed 13 years ago
#3432 closed defect (fixed)
Mapfile WEB TEMPLATE not working with URLs
Reported by: | c911469 | Owned by: | jmckenna |
---|---|---|---|
Priority: | low | Milestone: | 6.0 release |
Component: | Documentation - MapServer | Version: | unspecified |
Severity: | minor | Keywords: | |
Cc: | havatv |
Description (last modified by )
If the TEMPLATE parameter is changed to the absolute path of the file on the server, then the application works fine. The documentation for MapServer Version 5.6.1, section 5.23 "TEMPLATE..." suggests that both methods should work. I have attached my test HTML and MAP files.
The HTTP message to MapServer looked like below:
(Request-Line) GET /cgi-bin/mapserv?map=%2Fhome%2Fmaptools%2Ffgs%2Fwww%2Fhtdocs%2Fsbbt%2Fpathtest.map&zoomdir=1&zoomsize=2&mapext=105+-45+155+-5&mode=browse&program=%2Fhome%2Fmaptools%2Ffgs%2Fwww%2Fcgi-bin%2Fmapserv HTTP/1.1 Host pudl-gis-01.networks.in.telstra.com.au:8080 User-Agent Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 Accept text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language en-gb,en;q=0.5 Accept-Encoding gzip,deflate Accept-Charset ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive 115 Connection keep-alive Referer http://pudl-gis-01.networks.in.telstra.com.au:8080/sbbt/indexpathtest.html
Which got a HTTP302 response redirecting to
(Status-Line) HTTP/1.1 302 Found Date Mon, 12 Apr 2010 04:02:16 GMT Server Apache/2.2.11 (Unix) PHP/5.3.0 mod_python/3.3.1 Python/2.6.2 URI http://pudl-gis-01.networks.in.telstra.com.au:8080/sbbt/pathtest.html Location http://pudl-gis-01.networks.in.telstra.com.au:8080/sbbt/pathtest.html Content-Length 0 Keep-Alive timeout=5, max=100 Connection Keep-Alive Content-Type text/html
My install is a FGS Ver 9.5 package, installed onto RHEL 5.2. Mapserv Version is 5.6.0 Apache 2.2.11 (as per FGS version check)
Version output from MapServer: Version: MapServer version 5.6.0 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP OUTPUT=SWF OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=GEOS SUPPORTS=RGBA_PNG INPUT=EPPL7 INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE
Regards, Bill Teluk
Attachments (3)
Change History (5)
by , 14 years ago
Attachment: | indexpathtest.html added |
---|
comment:1 by , 14 years ago
Component: | MapServer CGI → MapServer Documentation |
---|---|
Description: | modified (diff) |
Milestone: | → 6.0 release |
Owner: | changed from | to
Priority: | normal → low |
Severity: | normal → minor |
I looked into this more and there's confusion about what URL means. It's not a remote file, identified by a URL, processed as a template but rather the URL itself is a template. For example:
TEMPLATE 'http://someurl/somescript.cgi?mapext=[mapext]'
The URL text contains substitutions. Theoretically you could have MapServer do some computations and then pass them on to another app, perhaps another MapServer one. This is a very, very lightly used feature, but a feature nonetheless. A more common use for templates is for building hotlinks as a result of queries. I do that all the time.
So, to some up. The code is working as expected and the docs could use some clarifications. Switching to the documentation component...
Steve
comment:2 by , 13 years ago
Cc: | added |
---|---|
Resolution: | → fixed |
Status: | new → closed |
The following was added to mapfile-> web for 6.0 trunk documentation in r12599:
URL is not a remote file, rather a template. For example:
TEMPLATE 'http://someurl/somescript.cgi?mapext=[mapext]'
HTML Front Page to application