mirror of https://gitlab.com/bashrc2/epicyon
gpx mime type
parent
2e0b5e9f9a
commit
de2da71381
14
daemon.py
14
daemon.py
|
@ -17093,13 +17093,17 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
# hashtag map kml
|
# hashtag map kml
|
||||||
if self.path.startswith('/tagmaps/') or \
|
if self.path.startswith('/tagmaps/') or \
|
||||||
(authorized and '/tagmaps/' in self.path):
|
(authorized and '/tagmaps/' in self.path):
|
||||||
kml_str = kml_from_tagmaps_path(self.server.base_dir, self.path,
|
map_str = kml_from_tagmaps_path(self.server.base_dir, self.path,
|
||||||
self.server.map_format)
|
self.server.map_format)
|
||||||
if kml_str:
|
if map_str:
|
||||||
msg = kml_str.encode('utf-8')
|
msg = map_str.encode('utf-8')
|
||||||
msglen = len(msg)
|
msglen = len(msg)
|
||||||
header_type = \
|
if self.server.map_format == 'gpx':
|
||||||
'application/vnd.google-earth.kml+xml; charset=utf-8'
|
header_type = \
|
||||||
|
'application/gpx+xml; charset=utf-8'
|
||||||
|
else:
|
||||||
|
header_type = \
|
||||||
|
'application/vnd.google-earth.kml+xml; charset=utf-8'
|
||||||
self._set_headers(header_type, msglen,
|
self._set_headers(header_type, msglen,
|
||||||
None, calling_domain, True)
|
None, calling_domain, True)
|
||||||
self._write(msg)
|
self._write(msg)
|
||||||
|
|
Loading…
Reference in New Issue