summaryrefslogtreecommitdiff
path: root/rc/bin/rc-httpd/handlers/serve-static
diff options
context:
space:
mode:
Diffstat (limited to 'rc/bin/rc-httpd/handlers/serve-static')
-rwxr-xr-xrc/bin/rc-httpd/handlers/serve-static4
1 files changed, 3 insertions, 1 deletions
diff --git a/rc/bin/rc-httpd/handlers/serve-static b/rc/bin/rc-httpd/handlers/serve-static
index 1e84f4c26..8cc0ce822 100755
--- a/rc/bin/rc-httpd/handlers/serve-static
+++ b/rc/bin/rc-httpd/handlers/serve-static
@@ -23,7 +23,7 @@ case *.html *.htm
case *.css
type=text/css
case *.txt
- type='text/plain; charset=utf-8'
+ type=text/plain
case *.jpg *.jpeg
type=image/jpeg
case *.gif
@@ -33,6 +33,8 @@ case *.png
case *
type=`{file -m $full_path}
}
+if(~ $type text/*)
+ type=$type^'; charset=utf-8'
max_age=3600 # 1 hour
echo 'HTTP/1.1 200 OK'^$cr
emit_extra_headers