X-Git-Url: http://www.dolda2000.com/gitweb/?p=ashd.git;a=blobdiff_plain;f=src%2Fsendfile.c;h=85ea9bb2a9c5eb7f4938e32e18d9c161f6f9a9e8;hp=81fb67a428198edf8ed7387ebc906eb8cf83ea5d;hb=a1c099c9f5caed39090dbaf0a88e25bc08b101c9;hpb=5283d505fcdfd7079e491b482a9f2367ff024201 diff --git a/src/sendfile.c b/src/sendfile.c index 81fb67a..85ea9bb 100644 --- a/src/sendfile.c +++ b/src/sendfile.c @@ -279,8 +279,12 @@ int main(int argc, char **argv) simpleerror(1, 405, "Method not allowed", "The requested method is not defined for this resource."); return(0); } - if(contype == NULL) - contype = getmimetype(file, &sb); + if(contype == NULL) { + if((hdr = getenv("REQ_X_ASH_CONTENT_TYPE")) != NULL) + contype = hdr; + else + contype = getmimetype(file, &sb); + } contype = ckctype(contype); checkcache(file, &sb);