in reply to Changing the content type
content-disposition: attachment; filename=foo.kml [download]
I had a bt of a thick moment as you have to remove the
print "Content-type: application/vnd.google-earth.kml+xml\n\n"; [download]
Many thanks monks