Dolda2000 GitWeb
/
ashd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
htparser: Be more tolerant to broken clients.
[ashd.git]
/
src
/
sendfile.c
diff --git
a/src/sendfile.c
b/src/sendfile.c
index
81fb67a
..
85ea9bb
100644
(file)
--- 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);
}
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);
contype = ckctype(contype);
checkcache(file, &sb);