[Geoserver-users] filename and extension in vnd.google-earth.kml+XML format

Hello, I'm creating an application which allows to download a kml file with
a defined bbox like the extension set to the screen. The request is in this
format:
http://localhost:8080/geoserver//wms?service=WMS&request=GetMap&version=1.1.1&format=application/vnd.google-earth.kml+XML&width=1024&height=1024&srs=EPSG:4326&layers=simo:bndpolamoz&bbox=

But the browsers treats the result in different ways, for instance safari
downloads a file called wms.kml, firefox 3 and explorer 7 a file called wms
without the file extension and opera displays the content of the file to the
screen. This causes that the user must rename the file to view it on google
earth or change the configuration of his browser(for opera).

I think this depend by the http header of the response.
Is there something I can do to make the downloaded to have a name like
"layername.kml"?

Thanks in advance.

Simone
--
View this message in context: http://www.nabble.com/filename-and-extension-in-vnd.google-earth.kml%2BXML-format-tp19369192p19369192.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

Simo D ha scritto:

Hello, I'm creating an application which allows to download a kml file with
a defined bbox like the extension set to the screen. The request is in this
format:
http://localhost:8080/geoserver//wms?service=WMS&request=GetMap&version=1.1.1&format=application/vnd.google-earth.kml+XML&width=1024&height=1024&srs=EPSG:4326&layers=simo:bndpolamoz&bbox=

But the browsers treats the result in different ways, for instance safari
downloads a file called wms.kml, firefox 3 and explorer 7 a file called wms
without the file extension and opera displays the content of the file to the
screen. This causes that the user must rename the file to view it on google
earth or change the configuration of his browser(for opera).

I think this depend by the http header of the response.
Is there something I can do to make the downloaded to have a name like
"layername.kml"?

Mumble, we should be setting that header all right... there is
a jira issue open about that problem that has been recently fixed:
http://jira.codehaus.org/browse/GEOS-1694

It seems it has been fixed by 1.7.0-RC1, and in fact I can confirm
that hitting GeoServer 1.7.0-RC2 returns the proper http headers
and the file gets saved with a nice name.

Not sure whether it has been fixed in the 1.6.x series thought,
apparently not? This would mean the upcoming 1.6.5 release won't
have this fix

Cheers
Andrea