Fixed mime/type for kmz files
authorJean-Michel Nirgal Vourgère <jmv@nirgal.com>
Fri, 14 Jan 2011 14:34:34 +0000 (14:34 +0000)
committerJean-Michel Nirgal Vourgère <jmv@nirgal.com>
Fri, 14 Jan 2011 14:34:34 +0000 (14:34 +0000)
bin/djais/views.py

index baef44bad28b98fd11922679c5d690db63352d7d..9ca918dc0944d423462e1ba62c89192e2be595ee 100644 (file)
@@ -511,7 +511,7 @@ def vessel_manual_input(request, strmmsi):
 @http_authenticate(auth, 'ais')
 def vessel_lastpos(request, strmmsi):
     value = kml_to_kmz(format_fleet([ strmmsi ], document_name=strmmsi).encode('utf-8'))
-    response = HttpResponse(value, mimetype="application/vnd.google-earth.kml")
+    response = HttpResponse(value, mimetype="application/vnd.google-earth.kmz")
     response['Content-Disposition'] = 'attachment; filename=%s.kmz' % strmmsi
     return response
 
@@ -737,7 +737,7 @@ def fleet_lastpos(request, fleetname):
         return HttpResponseForbidden('<h1>Forbidden</h1>')
     fleet_uset = load_fleet_to_uset(fleet.id)
     value = kml_to_kmz(format_fleet(fleet_uset, document_name=fleetname+' fleet').encode('utf-8'))
-    response = HttpResponse(value, mimetype="application/vnd.google-earth.kml")
+    response = HttpResponse(value, mimetype="application/vnd.google-earth.kmz")
     response['Content-Disposition'] = 'attachment; filename=%s.kmz' % fleetname
     return response