From 660cfa0d631f1f1474210e8856ea6b0a22e77fe1 Mon Sep 17 00:00:00 2001 From: Fredrik Tolf Date: Tue, 13 Dec 2011 19:58:30 +0100 Subject: [PATCH] etc: Use xset to pass content-type to sendfile. --- etc/ashd/dirplex.d/send.rc | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/etc/ashd/dirplex.d/send.rc b/etc/ashd/dirplex.d/send.rc index 1c4f7cf..ae540a2 100644 --- a/etc/ashd/dirplex.d/send.rc +++ b/etc/ashd/dirplex.d/send.rc @@ -1,20 +1,33 @@ +fchild send + exec sendfile + match filename *.html - fork sendfile -c text/html + xset content-type text/html + handler send match filename *.css - fork sendfile -c text/css + xset content-type text/css + handler send match filename *.txt - fork sendfile -c text/plain + xset content-type text/plain + handler send +match + filename *.js + xset content-type text/javascript + handler send # Image types match filename *.gif - fork sendfile -c image/gif + xset content-type image/gif + handler send match filename *.png - fork sendfile -c image/png + xset content-type image/png + handler send match filename *.jpg *.jpeg - fork sendfile -c image/jpeg + xset content-type image/jpeg + handler send -- 2.11.0