[Mapserver-dev] MIME Types...

Steve Lime steve.lime at dnr.state.mn.us
Mon Nov 3 19:36:22 EST 2003


The only other thing I can think of is to leverage template file
extensions. If I'm building up an SVG file from query results then I
would name all involved templates .svg. So we'd get:

.html or .htm => text/html
.svg => image/svg+xml 

and so on but this list could get endless. I like Franks idea cause it
opens the door for encoding operations like gzip. It's alot more complex
to add to the code though, we'd need a default HTML driver. OutputFormat
would be a more appropriate than ImageFormat...

Steve

>>> Daniel Morissette <morissette at dmsolutions.ca> 11/3/2003 3:33:52 PM
>>>
Steve Lime wrote:
> Hi Folks: I/we need to be able to change MIME types for query
results
> somehow. It's possible to output plain text, HTML, XML, SVG (with
new
> shpxy tag) and even PHP code as a result of a query, but at the
moment
> everything is sent as text/html. I could add a msGetQueryMIMEType
> function to examine template filename extensions and return a type,
but
> I'm wondering if something more general for templates and images
alike
> might be warranted. Thoughts?
> 

FYI the WMS Server's GetFeatureInfo has a way to specify the MIME type

returned by the query templates by setting the 
"wms_feature_info_mime_type" metadata in the top-level web object.  I 
did this because there was no better mechanism in place but I would be

very happy to change this to use a better mechanism if you create one.

I've read both Frank and Jan's suggestions and I think they both have 
pros and cons... I'm not sure which one I prefer...

Daniel
-- 
------------------------------------------------------------
  Daniel Morissette               morissette at dmsolutions.ca 
  DM Solutions Group              http://www.dmsolutions.ca/ 
------------------------------------------------------------




More information about the mapserver-dev mailing list