- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
# Fallback static file handler, now with XSendfile support.
if not if(test -f $local_path) {
if(! ~ $#xsendfile 0) {
if(! ~ $#xsendfile_alternate 0)
XSendfileHeader='X-Accel-Redirect'
if not
XSendfileHeader='X-Sendfile'
echo $XSendfileHeader': '`{pwd}^'/'$local_path
}
if not
static_file $local_path
}
if not if(~ $req_path /pub/* && test -f .$req_path) {
if(! ~ $#xsendfile 0) {
if(! ~ $#xsendfile_alternate 0)
XSendfileHeader='X-Accel-Redirect'
if not
XSendfileHeader='X-Sendfile'
echo $XSendfileHeader': '`{pwd}^'/'$req_path
}
if not
static_file .$req_path
}
dukzcry 19.05.2011 18:54 # −2
xsendfile=true
# Use 'true' for Nginx
xsendfile_alternate=false
guest 19.05.2011 19:15 # 0
guest 19.05.2011 19:15 # 0
dukzcry 19.05.2011 19:23 # 0
http://werc.cat-v.org/
http://hg.cat-v.org/werc/file/275899147886/bin/corehandlers.rc#l1
http://hg.cat-v.org/werc/file/275899147886/README#l1
http://sed-story.ru/blog/saitostroenie/21.html
Lure Of Chaos 19.05.2011 19:39 # +4
dukzcry 19.05.2011 19:48 # 0
dukzcry 19.05.2011 22:46 # +1
cgilib.rc:
fn static_file {
echo 'Content-Type: '`{select_mime $1}
if(! ~ $#xsendfile 0)
;
if not {
echo
cat $1
exit
}
}
corehandlers.rc:
# Fallback static file handler, now with XSendfile support.
if not if(test -f $local_path) {
static_file $local_path
if(! ~ $#xsendfile 0) {
if(! ~ $#xsendfile_alternate 0)
XSendfileHeader=$xsendfile_alternate
if not
XSendfileHeader='X-Sendfile'
echo $XSendfileHeader': '`{pwd}^/$local_path
}
}
if not if(~ $req_path /pub/* && test -f .$req_path) {
static_file .$req_path
if(! ~ $#xsendfile 0) {
if(! ~ $#xsendfile_alternate 0)
XSendfileHeader=$xsendfile_alternate
if not
XSendfileHeader='X-Sendfile'
echo $XSendfileHeader': '`{pwd}^$req_path
}
}
initrc.local:
# Support for sending static data directly via server.
xsendfile=true
# Use 'X-Accel-Redirect' for Nginx
# 'X-LIGHTTPD-send-file' for Lighttpd v1.4
#xsendfile_alternate='X-Accel-Redirect'
guest8 08.04.2019 20:49 # −999
guest8 09.04.2019 10:40 # −999