mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2024-11-22 07:11:52 +00:00
content type for gpx and kml
This commit is contained in:
parent
5ffe8230b1
commit
cb854696c9
@ -305,8 +305,16 @@ def getmimetype(path):
|
||||
"""Our own version rather than relying on what is provided by the python library. Note that when
|
||||
Apache or nginx is used to deliver /expofiles/ it will use it's own idea of mimetypes and
|
||||
not these.
|
||||
|
||||
This sets the Content Type in the HTTP header, e.g.
|
||||
Content-Type: text/html; charset=utf-8
|
||||
"""
|
||||
path = str(path)
|
||||
|
||||
if path.lower().endswith("gpx"):
|
||||
return "application/octet-stream"
|
||||
if path.lower().endswith("kml"):
|
||||
return "application/octet-stream"
|
||||
if path.lower().endswith(".css"):
|
||||
return "text/css"
|
||||
if path.lower().endswith(".txt"):
|
||||
|
Loading…
Reference in New Issue
Block a user