aboutsummaryrefslogtreecommitdiffstats
path: root/src/server/HttpServer.hx
diff options
context:
space:
mode:
authorRblSb <msrblsb@gmail.com>2023-04-23 12:34:38 +0300
committerRblSb <msrblsb@gmail.com>2023-04-23 12:34:38 +0300
commit341ec5ce86d1220060f63d2681b6e8eae11ec488 (patch)
treeaa232347348a0bdc75814bed30e057c8af00d237 /src/server/HttpServer.hx
parentb25ebe9ce888b516c6478be2592052a7916a736f (diff)
Use null coalescing op
Diffstat (limited to 'src/server/HttpServer.hx')
-rw-r--r--src/server/HttpServer.hx4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/server/HttpServer.hx b/src/server/HttpServer.hx
index 8e4cf75..4bf16c4 100644
--- a/src/server/HttpServer.hx
+++ b/src/server/HttpServer.hx
@@ -220,9 +220,7 @@ class HttpServer {
}
static function getMimeType(ext:String):String {
- final contentType = mimeTypes[ext];
- if (contentType == null) return "application/octet-stream";
- return contentType;
+ return mimeTypes[ext] ?? return "application/octet-stream";
}
static final ctrlCharacters = ~/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/g;
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage