do_log 200
echo 'HTTP/1.1 200 OK'^$cr
emit_extra_headers
-echo 'Content-type: text/html'^$cr
+echo 'Content-type: text/html; charset=utf-8'^$cr
echo $cr
echo '<html>
<head>
fn do_error{
echo 'HTTP/1.1 '^$1^$cr
emit_extra_headers
- echo 'Content-type: text/html'^$cr
+ echo 'Content-type: text/html; charset=utf-8'^$cr
echo $cr
echo '<html>
<head>
}
echo 'Location: ' ^ $2 ^ $cr
emit_extra_headers
-echo 'Content-type: text/html'^$cr
+echo 'Content-type: text/html; charset=utf-8'^$cr
echo $cr
echo '<html><body>'
if(~ $#3 0)
case *.css
type=text/css
case *.txt
- type='text/plain; charset=utf-8'
+ type=text/plain
case *.jpg *.jpeg
type=image/jpeg
case *.gif
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