diff --git a/addons/http_server/mimetypes.gd b/addons/http_server/mimetypes.gd index 8086cc3..407424e 100644 --- a/addons/http_server/mimetypes.gd +++ b/addons/http_server/mimetypes.gd @@ -11,7 +11,7 @@ enum SOURCE{ const UTF8 := "UTF-8" class MimeType: - + var full_type := "application/octet-stream" var type := "application" var sub_type := "octet-stream" @@ -49,20 +49,20 @@ class MimeTypeDb: func process_raw_db(raw_db: Dictionary) -> void: - + for type in raw_db: var mime_type := MimeType.new() mime_type.setup(type, raw_db[type]) if not mime_type.extensions or type == _default_mime_type.type: continue; - + for extension in mime_type.extensions: if extension in _types and (_types[extension] as MimeType).source > mime_type.source: continue _types[extension] = mime_type - + func get(ext_or_filename: String) -> MimeType: var ext := ("x."+ext_or_filename.trim_prefix(".")).get_extension().to_lower() if not (ext in _types):